Home
ModuleStudio User's Guide v0.6.1
Contents
1. List of External Links http modulestudio de en tutorial using the generator html http modulestudio de en tutorial validation instead of certification of 3rd party fram html ttps github com Guite MostGenerator issues 5 ttp modulestudio de en tutorial creating multiple elements quickly html http help eclipse org helios topic org eclipse gmf doc prog guide runti Developer 20Guide420t0 20Keyboard 20Accessibility html https github com Guite MostGenerator issues 254 http modulestudio de en tutorial moving fields with drag n drop html http modulestudio de en tutorial structure and custonisation of generafed applications html http modulestudio de en tutorial the first zikula application in 10 minutes https github com zikula core commit f7e3379e7060859aab334be6707fe6e0ab61baf8 http modulestudio de en tutorial working with multiple windows html ttp modulestudio de en product advantages of modulestudio html ttp modulestudio de en tutorial describing the model html ttps github com Guite MostGenerator issues 2 ttps github com zikula core pull 1561 files ttps github com Guite MostGenerator issues 46 http modulestudio de en tutorial basic settings in main editor html https github com Guite MostGenerator issues 87 http en wikipedia org wiki Function_point co Pp 124 https github com 13pp4rd DoctrineExtensions issues 936 125
2. Check The controller must be as signed to a controller con tainer Every controller must have a name Controller name must not contain underscores Controller name must not be Admin User Account Ajax Search or Init Every controller must contain at least one action There must not exist more than one main view dis play edit delete action in one controller Names of custom states in one controller must be unique This controller may not con tain a delete action Please remove it 53 Remarks Should not occur in practice this is just for completeness Controller name must have a length of at least three chars Should be at least four chars Underscores are not allowed as they are used for class au toloading These are reserved names and may therefore not be used for custom controllers Appears for special con trollers like ajax Those are reserved for special purposes and not intended to be called by the user as normal controllers 5 5 3 Action Context Action Custom action Custom action Action 5 5 4 Action handler Context Action handler Action handler Action handler Action handler with events Action handler 5 5 5 Action event Context Action event Action event Check The action must be assigned to a controller The action must have a name Action name must not be Main View Display Edit or Delete Every action must
3. 5 6 View layer 5 6 1 View container Context View container View container with views 5 6 2 View Context View View View Check Transition must be assigned to a controller container Every transition must have a name Every transition must have a source destination action There must not exist more than one transition between two actions Check The view container must con tain at least one view View names must be unique Check Every view must have a name Every view must have a root panel Every view must have the same name as the main entity it s controller refers to e g Customer View 55 Remarks Should not occur in practice this is just for completeness Inactive at the moment any way Must have a length of at least two chars whereby at least four chars are recommended A transition can not link to itself this is inactive at the moment though Remarks This rule is currently not ac tive as the view editor is not ready yet For example there may not be two views which are both named display Remarks View name must be longer than at least three chars Should be more than five chars 5 6 3 Root panel Context Root panel Root panel Root panel Root panel 5 6 4 Other Ul elements Context Composite container Tabbed pane Sub container Sub container Field Form label 5 6 5 Layout order Context
4. Beside the form handler classes this involves according template files Delete action For a delete action the generator creates the well known confirmation page asking the user whether he really wants to delete the given entity Custom action A custom action is only created as a mockup which contains the permission check as well as some other stuff which is always required like returning the output from a template fetched by the view 98 Action handler Action handlers encapsulate the reaction on user interactions The most common in stance is a form handler processing and validating some input fields The following handler types are available e List handler reacts on interactions with a view action 6 5 3 e g for filtering and sorting e Detail handler reacts on interactions with aldisplay action 86 5 3 e Edit handler reacts on interactions with an edit action 6 5 3 e Custom handler reacts on interactions with a custom action 6 5 3 A handler may have the following references e events Allows referencing one or more levents 86 5 3 e action Reference to the owning element e container Reference to the owning element e controller Allows referencing a controller 6 5 3 Not used yet by the generator at all Action event An action event represents something which can happen within the scope of an action handler For example this could be the press of a button The following e
5. Eager e EXTRA_LAZY Extra lazy The generator transforms these values to the corresponding implementation There are no differences made yet between the different fetch types as the generator uses DQL for almost all selections So beside the actual entity class there won t be any code parts affected based on which fetch type you use 90 Simple test Customers Addresses Orders Products Create address Content Street Edit customer NE Content This is a required field Email info guite de User gute Homepage sdag Please enter a valid URL Customer Is special subscriber y Find customer Axel Guckelsberger 2 O Cancel Create Meta data Created by guite GUITE Created on Sep 18 2010 Updated by guite Updated on Sep 18 2010 E Update customer Cancel Create address X Cancel Powered by ModuleStudio 0 5 1 Figure 6 5 Inline editing Relation edit type Represents different edit types for join relationships Can be one of the following options e ACTIVE_NONE_PASSIVE_CHOOSE Editing the parent does nothing Editing the child includes choosing the parent e ACTIVE_NONE_PASSIVE_EDIT Editing the parent does nothing Editing the child includes choosing adding and editing the parent e ACTIVE_CHOOSE_PASSIVE_NONE Only for many to many Editing the par ent includes choosing the children Editing the child does nothing e ACTIVE_EDIT_PASSIVE_CHOOSE
6. Language elements Controller A controller represents an area with functions which are called actions 6 5 3 In Zikula a controller is identified with the type parameter The following controller types are available e Admin controller for admin areas e User controller for user areas e Ajax controller for ajax functions e Custom controller for custom areas like edit A controller may have the following references e actions Allows referencing one or more actions 86 5 3 e container Reference to the owning element e handlers Allows referencing one or more action handlers 86 5 3 The generator creates controller classes with methods for each actions Action handlers are not considered yet If you have added some variables 86 5 2 the admin controller will contain a config method for managing the modvar settings Action An action represents a controller function which can be called by the user In Zikula an action is identified with the func parameter The following action types are available e Main action default function View action processes a collection of entities e Display action shows a certain entity in detail Edit action an action for editing an entity e Delete action an action for deleting an entity e Custom action for custom actions like mySpecialFunction An action may have the following references 97 e controller Reference to the owning element
7. Upload field Represents a field type for storing upload files An upload field has the following properties in addition to the common abstract string field 86 5 2 settings e allowedExtensions List of file extensions to be accepted during the upload sepa rated by a comma with a space char Default value is gif jpeg jpg png e length The length of this field Default value is 255 e namingScheme Defines how uploaded files fare named 86 5 2 77 e subFolderName Name of sub folder for storing uploaded files If this is empty the field name will be used as folder name e allowedFileSize Maximum file size in bytes default is 0 for no limit Inledit 86 5 3 pages the generator will use upload input elements If a field is manda tory the upload will be required when creating a new entity but not when editing an existing one If a field is optional not mandatory then it will be possible to delete existing uploads on editing For the output in and pages a download link is shown together with the filesize If the file is an image then a small version of it is shown instead of a text link on edit pages too by the way If an application has any upload fields the generator creates an additional util class containing methods for image processing The generated application uses it to create and store thumbnails on demand with the help of the Imagine library which is included in Zikula 1 3 There is a view modifier available
8. noaudit nocache nocheck nocompress nocycle nodename nodenumber nomaxvalue nomin value nonclustered none noorder normalized not notfound notnull nowait no_write_to_binlog null nullif nulls number numeric numparts obid of off offline offset offsets old old_table on once online only open open datasource openquery openrowset optimization optimize option optionally or order out outer outfile over overlaps overriding package padded pagesize parameter part partition partitioned partitioning partitions password path pctfree percent perm permanent piecesize placing pipe plan pragma position precision prepare prevval primary print prior priqty privileges proc procedure processexit program psid public purge query queryno raidO raise raiserror range rank raw read reads readtext real reconfigure recovery references referencing refresh regexp reindex release rename repeat repeatable replace replication require reset resignal resource restart restore restrict result result_set_locator return returns revoke right rlike role roll back round_ceiling round_down round_floor round_half_down round_half_even round_half up round_up routine row rowcount rowguidcol rowid rowlabel rownum rownumber rows rowset row_number rrn rule run save savepoint schema schemas scratchpad scroll search second seconds second_microsec
9. 2 true tru isActiv e bool true true 1 unit ssignment has n stepingredient 1 unit has n assignment unit name string255 true t shortN ame stringS t description text500 fals las owner user true true existingAmount decimall 0 2 false fals minimumAmountN ormal decimal 0 2 true fal minimumAmourtMenu decimall 0 2 ferus fale Figure 4 2 Model model 17 3 Controller Q m Admin Admin User Acco Ajax Suche Indivi 53 Aktionen 4 gt AN _ Mai View Displa JEdi aba Oe Bee Main View Display Edit Delete Indivi Aktion 2 Aktions Handler ae e o E User iS x ta g Liste Detail Edit Indivi Handl 2 Aktions Ereignisse 4 aad EN pais P Z Normal Start Ende gt berg nge Yi Aa Y a Umlei Benu Aktio Handl lo GS Mai Zuwei Figure 4 3 Controller model 4 4 Textual editors Beginning with ModuleStudio 0 6 0 there is also a textual syntax notation available Not visible at once it will be integrated into the UI step by step 4 5 Useful hints Here are some tutorial showing special abilities for certain use cases e Customise palette e Multiple container elements e Moving fields with drag n drop e Creating multiple elements quickly e Working with multiple windows 4 5 1 Keyboard shortcuts in graphical editors There are some very handy
10. 86 5 3 and display 6 5 3 templates an output modifier is used to display the full country name instead of the unreadable country code e htmicolour A boolean specifying whether this field represents a html color code like 003399 or not If set to true a colour picker is used in edit 86 5 3 pages for convenient selection of colour codes e language A boolean specifying whether this field represents a language code or not If set to true a language selector is used in edit 86 5 3 pages For the output in view 86 5 3 and display 86 5 3 templates the getlanguagename modifier is used to display the full name instead of the unreadable language code e length The length of this field Default value is 10000 e password A boolean specifying whether this field represents a password or not If set to true a password input element will be used instead of a normal one in edit 6 5 3 pages In ledit 6 5 3 pages the generator will use singleline input elements for string fields except you defined something else like language or password Other validations are added together and applied as well Text field Represents a field type for storing larger text A text field has the following properties in addition to the common labstract string field 6 5 2 settings e length The length of this field Default value is 10000 In edit 6 5 3 pages the generator will use multiline input elements text
11. E E E E 109 8 2 Reporting e 2 8 ood a ra a una de 109 8 2 1 Documentation 22 2 2 Km m nen 109 u Be a eset ee ues BS ak Gas Te Be 109 an ee ee eee ie See oe eee ee Gas 109 8 3 Additional notes o s s sa s ed nn 9 AddOns a ee a ieee whi aa een ans jee a oe oe ck ee ee ee ae ek hoa in hrs ones wee ose en eee odas og OG eh eee ewe 9 1 5 Other extensions 92 Extension Points s s sma m nen 9 3 Additional notes Ill Appendix Ale Boe ne Pom A Hla eh te eee o As a Ei ee 10 2 General hintsl ud da r on inaa E e a i a EE a ehe ae O Goa ee N en aa ne 10 3 1 Boolean properties can t be unset o 00000008 Sey a ae BG Oe ee a GE ch ARSE ob Ged quedo Hh Ger RAS A SAS 10 3 4 I can t save my model 2 2 En on nn ijk RAT ESR ES HS EMER Ee eS IE Geria ss A eed A A ee od by eee E a wees eae AS 10 5 2 Orphan removal with many to many relations 10 5 3 The workflows are not fetched properly 10 5 4 Patch for category selector 2 o nn 11 Glossary 11 1 110 110 110 110 110 110 110 110 110 111 112 112 112 112 112 112 112 112 113 113 113 114 114 114 114 115 Part I First steps 1 Introduction 1 1 About ModuleStudio ModuleStudio is a development environment with which one can quickly simply and effi ciently describe and generate web applications Software developers can create complex Zikula ex
12. Engine 11 5 O R Term Object Constraint Language Object Management Group OCL OMG ORM PDE PDF PHP PIM PLE Pointcuts Product line Product Line Engineering PSM Query View Transition QVT RAP RCP Reference implementation Rich Ajax Platform Rich Client Platform 122 Description Standard language for the definition of con straints adapted by the Object Manage ment Group Consortium developing different standards for improving interoperability beside others MDA UML Object Constraint Language and Query View Transition See Object Constraint Language See Object Management Group Object Relational Mapping Plugin Development Environment Portable Document Format PHP Hypertext Processor Platform Independent Model See Product Line Engineering Program code parts where aspects can em bed the handling of cross cutting concerns A software system family in the context of product line engineering A principle comparing software development with industrial production processes and aiming on according automations Product Specific Model Standardised language adapted by the Ob ject Meta Group for model to model trans formations See Query View Transition See Rich Ajax Platform See Rich Client Platform Existing application of a software system family Used in AC MDSD for deriving a domain s core concepts from the solution space Ajax port for SWT elements and other parts
13. be as signed to an action handler Check Every action handler must have a name Action handler name must not be List Detail or Edit The action handler must contain at least one action events The action handler must con tain at least one start event Every action handler must have the same name as the main entity it refers to e g CustomerHandler Check Action event must be as signed to an action handler Every action event must have a name 54 Remarks Should not occur in practice this is just for completeness Action name must not be New or Hooks Must have a length of at least four chars whereby at least six chars are recommended These are reserved names and may therefore not be used for custom actions Not active yet as the con troller editor needs some ad ditional features first Remarks Must have a length of at least four chars whereby at least six chars are recommended These are reserved names and may therefore not be used for custom handlers There must not exist more than one start event in one action handler Not active yet as the con troller editor needs some ad ditional features first Remarks Should not occur in practice this is just for completeness Must have a length of at least four chars whereby at least six chars are recommended 5 5 6 Transition Context Transition Transition Transition Controller container with transitions
14. but just a question of how the deployment process should be You can for example move the overridden templates into the module before a release If you need additional display oriented logic simply create a view plugin encapsulating your efforts in a file which is not affected by the generator at all 7 2 4 Code additions Perform logical enhancements in the generated implementation classes These extend from abstract base classes containing the actual generator implementation code So almost all concrete classes are empty waiting for your custom extension The Controller Util class can be used to enable disable specific controller actions like view display and additional functionality like blocks mailz api content type etc for particular entity types within custom conditions When using edit forms you can easily customise the redirect behaviour by appending a returnTo parameter to the edit url For example let s imagine you modeled a customer entity having a bidirectional relationship to many addresses In this case the default behaviour of the edit address functionality redirects back to the detail view of the creat ed updated entity if it exists in the model If there is no display action it redirects to the list view if existing else it jumps to the index page Using the returnTo parameter you can assign certain pages like display view and even related items like customerDisplay 7 2 5 Use versioning Using a version cont
15. e incoming Allows referencing one or more incoming relationships 86 5 2 e indexes Allows referencing one or more indexes 6 5 2 listeners Allows referencing one or more event listeners 86 5 2 e outgoing Allows referencing one or more outgoing relationships 6 5 2 One additional note about slugs and permalinks the generated short url handlers will understand different url schemes for the display pages 6 5 3 depending on the entity settings e Entities which are not sluggable use the identifier for display urls for example mymodule person 5 html 71 e Entities with unique slugs use the slug for display urls for example mymodule person william smith html e Entities with non unique slugs combine both methods for example mymodule person william smith 5 html Entity field Represents an entity field in the data layer This base class has the following children at the moment e Derived fields 86 5 2 correspond to normal columns which are stored in a database e Calculated fields 6 5 2 correspond to fields which can calculate their values based on other fields An entity field may have the following references e entity Reference to the owning element Derived field Represents an entity field in the data layer which is mapped to a database column A derived field comes straight from the data source A derived field has the following properties in addition to the commonlenti
16. element for the corresponding select element At the moment this has not been done yet though so list vars are currently handled in the same way like text vars 95 Entity event listener Base class for model elements representing entity event listeners List of supported events e PrePersist PostPersist e PreUpdate PostUpdate e PreRemove PostRemove e PostLoad An event listener may have the following references e operations Allows referencing one or more transform objects 86 5 2 Event listeners are not part of the model editor yet and are therefore ignored by the generator at the moment Instead the generator creates simply all listener methods for all entities Transform object Base class for transformation objects encapsulating algorithm puzzle pieces Examples e Arithmetic operations e Datetime operations e Financial operations e Logical operations e String operations e g replacements e System calls A transform object may have the following references e container Reference to the owning element Transform objects are not part of the model editor yet and are therefore ignored by the generator at the moment Combinations and edge cases This section is going to collect certain combinations of elements in practical scenarios The intention of this section is to point out dependencies and other essential aspects relating the combination of model elements in various ways 96 6 5 3 Controller layer
17. field must be greater than the scale Minimum value must not be larger than maximum value The default value for a float field must be a floating point number 49 Minimum value must not be larger than maximum value Remarks Corresponds to a bigint map ping in Doctrine 2 If an integer field acts as aggregate field the cor responding entity must use one locking strategy of OPTIMISTIC PAGE LOCK_OPTIMISTIC PES SIMISTICCREAD PAGE LOCK_PESSIMISTIC_READ depending on whether you want support the Zikula PageLock functionality in addition or not If an integer field acts as ag gregate field the property ag gregate for must define the target alias of correspond ing outgoing and bidirec tional one to many relation ship with persist cascade Af ter a char as delimiter the name of the target field to be aggregated follows For example 1234 12 is valid 4 gt 2 but 123 1234 is not String and text fields Context All string fields All string fields String field String field String field String field String field String field Email field Url field Date and time fields Check String size must not be smaller than 1 String size must be larger than minimum length String length for country codes must be at least 2 chars String length for languages must be at least 5 chars String length for HTML colour codes must be at least 7 chars A string can only b
18. for example due to overlapping functionality The generator uses this value in the corresponding module dependency created in the version class Model container Container class for carrying elements in the model layer A model container may have the following references e application Reference to the owning element e defaultDataSource Whether this container represents the default data source or not The default value is true which can only be assigned to one data source which is treated like an internal Zikula storage Additional containers are processed as external data sources e entities Allows referencing one or more entities 6 5 2 e numExampleRows The amount of example rows to create for entities in this model layer Default value is 0 Note that if you activate the categorisable property for an entity the generated installer relies on that you did not remove the default categories of Zikula If you deleted them please set the amount of example rows to 0 to avoid problems e relations Allows referencing one or more relationships 6 5 2 e variables Allows referencing one or more variables 6 5 2 For each entity as well as for many to many relationships according classes are gener ated More details are explained in the model layer section 86 5 2 However external data sources are not treated correctly see for more information 66 Controller container Container class for carrying element
19. is found on your system path a dialog appears and you are suggested to download and install the JRE before starting ModuleStudio 3 1 1 Additional notes for MacOSX If ModuleStudio does not start but fails with an error please check the created error log file In case it contains lines like MESSAGE Missing required capability Require Capability osgi ee filter amp osgi ee JavaSE version 1 7 then the system is not using Java Standard Edition 7 To verify this open a console and type java version If Java 7 is used in your system by default the output should show something starting with 1 7 x According to feedback from our users it is also important to install the MacOS JDK instead of the JRE since the JDK installer properly tells OSX to use 1 7 where the JRE does not 3 2 First tour First thing you may want to do after starting the ModuleStudio application is creating a new model Therefore start the new application wizard using the File main menu It allows you to enter some basic information like vendor and application name in a simple form After that it creates a new model and preinserts some common basic container elements so that you can directly proceed with describing your application in detail Please see this tutorial for getting the overall idea 3 3 Development process Developing model driven applications works well in combination with an iterative incremental development process In this approach
20. many to many relationships This feature is supported only in newer versions of Doctrine 2 therefore you need to use 1 4 0 if you want to use it 10 5 3 The workflows are not fetched properly Due to a problem in Zikula 1 4 0 the workflow data can not be fetched automatically for an entity yet Because if the postLoad listener in the entity class method performPost LoadCallback calls the workflow the Zikula workflow util class does another selection for this This leads to both selections getting into a competition about the internal object hydrator of Doctrine The workflow selection steals it from the main selection So after the first item when it wants to fetch the second one it is not possible anymore In 1 3 x this was not a problem because workflows were called using DBUtil bridged by Doctrine 1 A clean solution would not use any workflow util class but join the workflow entity directly But this affects too many parts to do it quickly Also to make it really beautiful we would need own workflow tables for each entity like done with categories for example in order to keep things together Before the initWorkflow method was called at two places the entity constructor for newly created entities and the postLoad listener for fetched entities Note the Doctrine 2 development is working on a new event which is triggered after all entities have been fetched The current workaround is having the init Workflow call moved outs
21. not 1 1 or 2 1 0beta This is obsolete and will be removed in a later version Please keep it empty At the moment ModuleStu dio wants a model with at least one entity If you are modeling an extension with out any data storage just cre ate some dummy elements Unique identification and separation of data sources Each model container has a property marking it as de fault data source or not Only one container can set 5 3 3 Settings container Context Settings container Settings container 5 3 4 Referred application Context Referred application Referred application Referred application Referred application Referred application 5 3 5 Model container Context Model container Model container Application with model con tainer with entities Check Settings container must be assigned to an application Scribite plugins require exter nal controller and finder com ponent Check The imported application must have a name Please specify the minimum version for the dependency The minimum version must conform to the pattern x y z Please specify the maximum version for the dependency The maximum version must conform to the pattern x y z The minimum version must not be greater than the max imum version You need to specify the URI of the imported application s model file Check The model container must have a name Model container must be as signed to an applic
22. of the Rich Client Platform Generic application framework based on Eclipse Allows the implementation of portable Java applications 11 6 S Z Term SDK Smarty Software Engineering Software system family SPL Sub domain SVN SWT System use case Transformation UML Unified Modeling Language URI URL Use case UUID XMI XML XML Metadata Interchange XP XSD 123 Description Software Development Kit Template engine used in Zikula for a strict separation of content and presentation Engineer discipline for systematic improve ment of the quality of software systems Collection of several applications whose schematic code parts are based on the same architectural principles Standard PHP Library Functional or technical partition of a domain which deals with the representation of spe cific aspects of a software system Subversion Standard Widget Toolkit See Use case Modification of models leading to other models again or to source code See Unified Modeling Language Standardised language adapted by the Ob ject Management Group for describing soft ware systems with models The UML works model based Uniform Resource Identifier Uniform Resource Locator An interaction offered by a software system Universally Unique Identifier XML Metadata Interchange Extensible Markup Language XML based file format for interoperable storage of models Extreme Programming XML Schema Definition
23. ships between controller and model containers This speci fices which controller func tions may process data from which sources You have to create relation ships between controller and view containers This speci fices which controller func tions may use which view templates for their output This rule is currently not ac tive as the view editor is not ready yet Predefined controllers are unique per application i e there is only one admin area For example there may not be two controllers which are both named edit Remarks The view name must have a length of at least three chars Recommended are at least four chars Should not occur in practice this is just for completeness 5 4 Model layer 5 4 1 Model container Context Model container Model container with entities Model container with entities Application with model con tainer with entities Model container Check The model container must contain at least one entity Entity names must be unique The amount of entities is get ting quite high Maybe it makes sense to split up the model into two single appli cations An entity must not have the same name as the applica tion It is recommended to add two integer variables named pa geSize and showOnlyOwnEn tries for controlling the view action s behaviour 28 Remarks For example there may not be two entities which are both named person This warning a
24. shortcuts hidden in ModuleStudio For example it can be worth to experiment with the Ctrl Alt on Mac and or Shift keys when moving or resizing an object 18 Here is a list of all editor shortcuts If one has selected a palette tool and creates an object in the diagram it is usually required to select the tool again in order to create another object If one presses the Ctrl Alt on Mac key one can create multiple elements of the same type in one step 4 5 2 Keyboard shortcuts in textual editors The following list shows some basic commands which might be helpful when using the textual editors Shortcut Alt Up Alt Down Alt Left Alt Right Alt Shift Up Alt Shift Down Alt Shift R F3 or Ctrl MouseClick Ctrl Up Ctrl Down Ctrl PgUp Ctrl PgDown Ctrl 0 Ctrl 1 Ctrl Ctrl Space Ctrl D Ctrl L Ctrl M Ctrl W Ctrl Q Ctrl Shift F Ctrl Shift G Ctrl Shift F3 4 6 Additional notes None yet 4 7 Textual Grammar Action description Move current line or selection one line up down Go back forward in the history of editors Expand selection to containing element Rename current element as well as all other occurences Follow reference under cursor Scroll one line up down Activate previous next editor tab Pop up outline for easy navigation and fil tering Quick fix of errors Toggle comment for line or selection Start content assist suggesting possible val ues Delete current li
25. specific language represented by meta mod els Architecture Centric MDSD a specialisa tion of MDSD often used for the domain software architecture Covers a domain beginning from the solution space by util ising reference implementations A principle for managing the development process with agile technologies Aspect Oriented Software Programming Aspect Oriented Software Development Application Programming Interface See AC MDSD Development paradigm increasing maintain ability of complex system by separated treatment of cross cutting concerns with as pects Backus Naur Form Function for integration of object specific business logic into an overall system Modularised generator component which ex ecutes a specific task and can be flexibly combined with other components Enhancement of AC MDSD for separation of different generators into modular car tridges In this context a cascading defines a sequential combination of several cartridges See Cross Cutting Concern Integrated tutorial with interaction elements for an extended user support Complete MOF Textual structural graphical or hybrid notations of a domain specific language Serves for describing applications in the form of models by the user Rule like definition in context of a meta class Serves for validation of models which are based on the corresponding meta model A function representing a separatable aspect whose implementation affects multiple pr
26. which works together with the mentioned util class and understands many parameters to use arbitrary images in the templates For every upload field foo there will be another created which is named fooMeta This field stores some meta information about the uploaded files for convenience like the file size the image format portrait landscape square and the image dimensions Upload naming scheme Represents different schemes for naming uploaded files Can be one of the following options e ORIGINALWITHCOUNTER Keep the original file name Add a counter if required to avoid duplicated file names e RANDOMCHECKSUM Use a random checksum This results in quite cryptic filenames e FIELDNAMEWITHCOUNTER Use the field name as a prefix together with a counter For example imagel image2 and so on Within the generated upload handler class one of those strategies will be selected depending on from which entity the currently treated upload file List field Represents a field type for realising a selection of list values A list field has the following properties in addition to the common Jabstract string field 6 5 2 settings e length The length of this field Default value is 255 78 e multiple A boolean specifying whether multiple items can be selected concurrently or not The default value is false e useChecks A boolean to enable a checkbox list only if multiple is set to true The default value is false A
27. you start with a small model which will then be 12 enhanced in several steps whereby some short tests verify that the direction is correct Each cycle consists of the following steps 1 Create or change model 2 Regenerate 3 Merge changes 4 Test intermediate results 3 4 Migrating old models To open a model from an older version please remove all account controllers and search controllers first Afterwards the existing model can be converted by using the menu entry File gt Migrate old model from 0 5 x 3 5 Migrating old modules If you want create a model for an existing legacy module you can follow the following procedure 1 First get the file pntablesToXML php from 2 Use this script to migrate your old pntables php file to an xml file 3 Inside ModuleStudio use the menu entry File gt Import xml table definition which will open a file selection dialog Choose the xml file you just created As a result you will get a new application model in the MOST_output yourmod mostapp file 4 Now use File gt Initialize diagram file to open this application model and create a new diagram file for it 5 In the data editor remove unrequired elements like table prefixes and default identifier fields that are primary and foreign keys 6 Follow validation messages to get remaining stuff sorted properly Example import results 3 6 Additional notes None yet 13 Es admin_category false admin_m
28. CH PERSIST_REMOVE PERSIST_MERGE PERSIST_DETACH REMOVE_MERGE REMOVE_DETACH MERGE_DETACH PERSIST_REMOVE_MERGE PERSIST_REMOVE_DETACH PERSIST MERGE DETACH 89 e ALL The cascade type is implemented as defined in the association s annotation within the corresponding entity classes At the moment there are no other code parts depending on that Auto completion usage Defines whether and which sides of a relationship will be handled by an auto completion field instead of a dropdown field during editing Note that inline creation and editing of related items see edit types 86 5 2 is only possible when using the auto completion approach Can be one of the following options e NONE Use no auto completion e ONLY_SOURCE_SIDE Use auto completion when selecting entities of the source side editing of the target side e ONLY_TARGET_SIDE Use auto completion when selecting entities of the target side editing of the source side e BOTH_SIDES Use auto completion on both sides Actually these settings are part of the view layer 6 5 4 and actually they are going to be moved somewhen in future But this is a case where we decided that we don t want to wait until the view layer is ready to be used as priorities require to do other things first Example for inline editing Relation fetch type Represents different fetch types for join relationships Can be one of the following options e LAZY Lazy e EAGER
29. Editing the parent includes choosing adding and editing the children Editing the child includes choosing the parent e ACTIVE EDIT PASSIVE EDIT Editing the parent includes choosing adding and editing the children Editing the child includes choosing adding and editing the parent e ACTIVE_EDIT_PASSIVE_NONE Only for many to many Editing the parent includes choosing adding and editing the children Editing the child does nothing Actually these settings are part of the view layer 6 5 4 and actually they are going to be moved somewhen in future But this is a case where we decided that we don t want to wait until the view layer is ready to be used as priorities require to do other things first 91 For each entity the generator creates some templates to be included in the edit tem plates of related entities for example a display list and another one for edit Depending on which edit type is defined for a relationship the corresponding edit template choose or edit is included or not e NONE means that there is no possibility to take influence on the association e CHOOSE means that it is possible to select a related entity with the help of auto completion e EDIT means the same as CHOOSE plus that it is also possible to created and edit related entities during editing the main entity Inheritance relationship Represents inheritance relationships for describing entity class hierarchies It includes the following pr
30. L e NO e PREVIOUS Submit activator A submit activator may have the following references e submitContext Allows referencing a container 6 5 4 Cancel activator A cancel activator may have the following references e cancelContext Allows referencing alcontainer 86 5 4 Submit link Inherits from both submit activator 6 5 4 and link 86 5 4 Back link Inherits from both cancel activator 6 5 4 and link 6 5 4 104 Layout order With layout orders you can add relations to panels to define whether they should float beside each other or not It includes the following properties e length The length value e lengthtype The length type see below Default is PIXELS e type The type of layout order see below Default is HORIZ_LEFT A layout order may have the following references e source Reference to source sub container e target Reference to target sub container e viewContext Reference to the owning element Layout order type Defines how the panels are connected to each other visually Can be one of the following options e HORIZ_LEFT e HORIZ_RIGHT e VERTICAL Layout order length type Specifies the unit which is used for the length definition Can be one of the following options e PIXELS e PERCENT e EM e EX e CENTIMETER e MILLIMETER e INCH e POINTS e PICAS 105 Combinations and edge cases As there is no view editor available yet this section is emp
31. Layout order Layout order View container with layout orders 5 7 Workflow layer Check Every root panel must have a presenter Every root panel must con tain at least one composite container Every view must contain at least one submit activator Check Check Composite container must be assigned to a root panel A tabbed pane must contain at least two child containers Child container must be as signed to a parent container Every sub container must contain at least one field Field must be assigned to a container Label must point to a field Check Layout order must be as signed to a presentation con tainer Every transition must have a source destination con tainer There must not exist more than one layout order be tween two containers Remarks Ideally every view should contain also at least one can cel activator Remarks Remarks A layout order can not link to itself The workflow layer is not implemented yet This section is just a dummy for future 56 5 8 Additional notes None yet 57 6 Application generator 6 1 Introduction The main use case for ModuleStudio application models is the creation of Zikula exten sions This section describes how the generator works and which artifacts are created from which model elements ModuleStudio brings also other generator cartridges 8 1 for creating further infor mation with regards to d
32. ModuleStudio User s Guide v0 6 1 Axel Guckelsberger and many others March 13 2014 Contents First steps EA Me EON us Bh E Sess aden de Gr Ge 1 2 Benehits 2 2 oe 6 8 8 54 ok we Dee ae Se em ee BO A ee 1 3 About this manual oca Be bau a da a Owe ee e ee He A oid os Shinde ne ee a nee en ne ns Be a a u ee ea ce ae Eh re are 1 45 Workflow layer gt s sos e a He 2 ta DE 1 5 Additional notes u sy eee am Lea name OS G 2 1 Introduction isa a ce k a we ka dl fea ee Gee ela oe Ae Se Ge ee 2 2 1 Meta model 2 2 2 Constraants 2 26s a2 40d as hla eee e we Ae Se eed I SOR a Eis Os ae Bg Sane eae I O ee ae er ee ee ee E 2 3 1 Graphical 4 42 26 4a 4a we dee Sea ee oe aoe a SS Qed 2 lera ser a SY aed Sw a E Ba wae a es Bw 2 3 3 Structural sx a Be 2 2 2 208 2 8 E ee OE ek ace een 23 4 Hybrid 2 246 a4 2 6a oe Se oe eee eae ia den 2 4 Generators 2222 2 Coon 9 4 1 ZOIASSIC dis ck rs 2 na aa ah nahen ee 2 4 2 Reporting 0 a a aa AR a ee E 2 5 Additional notesl ss s s gt s d xa on nn S L Installation 32 22 amp See we ee 2 32 2 888 Ba ae ea Ber he ee Res os Ge S 3 2 First COUP apns d i Ro Ae Se a oe a BOG A ec ed Be a ee be Stade AB oe ce td eg ts en eh eee A AS ble ced OM die Dba te beh ae Gore de pie eee ee be tee ate G4 ie aa a ae Sw eed ey a ee Se E 10 10 10 10 10 10 10 11 11 11 11 11 11 11 3 6 Additional notes oe s e s ad mn 13 16 a a a
33. O a Check Entities with sluggable be haviour may not include a field named slug The sluggable position values must be unique per entity Only one field per entity may store the sortable position The sortable position may not be the sortable group too You need another field as sortable position to make the sortable group work Only one field per entity may store the version Only one field per entity may represent a start date Only one field per entity may represent an end date Entities with a version field should use optimistic locking 40 A y E A AO dr A Og TA OA re IP E Remarks If a field is named slug it gets this error as soon as at least one field in this entity has set the sluggable position at tribute to a number greater than 0 ModuleStudio cre ates this slug field automat ically in addition to the other fields in the model If fields are included into a slug by setting a value greater than 0 this value must be unique per entity The po sition defines in which order the field values are considered as permalink parts Can occur if one tries to use multiple integer or user fields as position for the sortable extension As soon as a field is used as sortable position it can not also act as the grouping cri teria at the same time Can occur for a field marked as sortable group Can appear for integer and datetime fields if you enabled the version property for more than one
34. ain a timestamp in all files or only in the Version class Default value is false e generatePoweredByBacklinksIntoFooterTemplates A boolean specifying whether generated footer templates should contain backlinks to the ModuleStudio home page Default value is true e generateTests A boolean specifying whether test cases should be generated or not Default value is true e writeModelToDocs A boolean specifying whether the model files are written into the module s docs folder or into a separate folder outside the module Default value is false Referred application Represents an application whose model file is being imported e g to reference other entities or other extensions which are incorporated by api calls An application reference has the following fields e minimum Version The minimum version this reference applies for 65 e mazimum Version The maximum version this reference applies for e importURI URI to imported model file e dependencyType The type of dependency which should be used for the referred application See below 86 5 1 Application dependency type Specifies the kind of dependency to a certain application Can be one of the following options e REQUIREMENT The module is required for example to join related entities e RECOMMENDATION The module is recommended for example to provide enhanced integration functionality e CONFLICT The module is in conflict with the modeled one
35. area 76 User field Extension oflabstract integer field 6 5 2 for storing user ids An user field has no fields or references in addition to the common abstract integer field 86 5 2 settings In edit 6 5 3 pages the generator will implement an auto completion element allow ing searching users by their name For the output in view 6 5 3 and display 86 5 3 templates the user name is shown and linked to the corresponding user profile in case a profile module has been set in the Settings module administration Email field Represents a field type for storing email addresses An email field has the following properties in addition to the common abstract string field 6 5 2 settings e length The length of this field Default value is 255 In edit 86 5 3 pages the generator will use email input elements as well as validation on client and server side For the output in view 6 5 3 and display 6 5 3 pages an icon will be shown linking the email address Url field Represents a field type for storing urls An url field has the following properties in addition to the common labstract string field 86 5 2 settings e length The length of this field Default value is 255 In edit 86 5 3 pages the generator will use url input elements as well as validation on client and server side For the output in view 86 5 3 and display 86 5 3 pages an icon will be shown linking the url
36. as leading However this was not flexible enough in practice With the display pattern you can specify arbitrary expressions which are used as textual representation for instances of this entity For most cases you may want so declare just one field which is done like title A more complex example would be lastName firstName age years Of course all fields must exist in the entity with exactly the names used within the display pattern geographical A boolean specifying whether the geographical extension is used or not If set to true the generator will create two additional fields named latitude and longitude Also it will consider them in all important application areas and provide an export for the kml format During the creation of a new entity with geographical support a nice geolocation feature is used to ask the user for his current location Also there is an included integration of the Mapstraction class allowing you to use different map providers in your application hasArchive Whether the workflow should include an archived state with auto matic archiving Requires aldatetime 6 5 2 or date 6 5 2 field which has been designated as end date See workflow types 6 5 2 for more information The default value is false hasTray Whether the workflow should include a suspended state See workflow types 86 5 2 for more information The default value is false identifierStrategy Whether and which lidentifie
37. at you have opened your application model and there are no validation errors 5 left 6 3 1 Input dialogs First you have to select which generator cartridges you want to execute After that you have to select which reports you want to create only if you did not unselect the reporting cartridge before 6 4 The workflow The rough steps of the generator workflow are as follows 1 Ask for input parameters for example desired output folder cartridges and re ports 2 Empty output directory 3 Export dumps of editor diagrams if reporting cartridge is selected 4 Read input model 5 Perform validation 6 Transformation to add primary and foreign key fields 7 Call generator inner workflow for each selected cartridge 59 hed i Please select desired cartridges Ya Please select which generator cartridges you would like to execute zclassic zoo reporting Select All Deselect All OK Cancel Figure 6 1 Cartridge selection 6 5 Generator reference This reference goes through all available model elements as well as their properties describing what the generator does with this information and which things are still missing in the created implementation You will notice that there are also some elements included which are not showing up in ModuleStudio itself yet This is for showing up the picture we have in mind when designing the modeling language as a whole In most cases where the generato
38. ation Exactly one entity must be declared as leading lead ing true 26 Remarks Should not occur in practice this is just for completeness Remarks Use the real name of the mod ule being imported Remarks The container name must have a length of at least three chars Recommended are at least four chars Should not occur in practice this is just for completeness More information tity section 85 4 2 5 3 6 Controller container Context Controller container Controller container Controller container Controller container Application with controller container with controllers Application with controller container with controllers 5 3 7 View container Context View container View container Check The controller container must have a name Controller container must be assigned to an application Every controller container must rely on at least one model container Every controller container must reference at least one view container There must not exist more than one admin user ajax controller Names of custom controllers must be unique Check The view container must have a name View container must be as signed to an application 27 Remarks The container name must have a length of at least three chars Recommended are at least four chars Should not occur in practice this is just for completeness You have to create relation
39. ch char The standard fields extension is required to determine the owner createdUser of an ob ject 32 Extension related entity settings Context Entity defined as loggable Entity defined as geographi cal Entity defined as loggable Entity with translatable field Entity defined with closure tree Entity defined as attributable Entity defined as categoris able Entity with meta data Check Loggable entities need one field with the version at tribute set to true Entities with geographical behaviour should ideally con tain a String Field with name zipcode with a length of at least 10 There must not exist an en tity named FooLogEntry as this is reserved by the corre sponding extension There must not exist an en tity named FooTranslation as this is reserved by the corre sponding extension There must not exist an en tity named FooClosure as this is reserved by the correspond ing extension There must not exist an en tity named FooAttribute as this is reserved by the corre sponding extension There must not exist an en tity named FooCategory as this is reserved by the corre sponding extension There must not exist an en tity named FooMetaData as this is resg8ved by the corre sponding extension Remarks Can be either integer or date time fields Just a warning to support best practices For an entity named person ModuleStudio does not only generate corr
40. change trigger field must point to workflowState the name of a field or a relation prop erty field It would be preferable to use an integer column as version field as datetimes could po tentially lead to conflicts for high traffic sites depending on the timestamp resulution in the database The default value for a date time field must conform to the pattern YYYY MM DD HH MM SS or now The default value for a date field must conform to the pat tern YYYY MM DD or now The default value for a time field must conform to the pat tern HH MM SS or now 44 Remarks You can only activate either past or future validators for one field You can only activate either startDate or endDate flags for one field If the timestampable prop erty for a field has been set to CHANGE then this er ror can appear to remind you to set also the re quired attribute timestam pableChangeTriggerField Ei ther you did not set anything there or the value does nei ther correspond to workflow State nor the name of an en tity field nor an incoming re lation If you use datetime fields with version set to true this warning will appear As the Doctrine 2 manual points out integers are more ro bust against race conditions in high traffic environments where timestamp compar isons are limited due to how precise the used database does it Therefore you should prefer integer fields for stor ing versions except side con dition
41. chars Remarks Not relevant yet this is for fu ture Not relevant yet this is for fu ture Not relevant yet this is for future Should not occur in practice this is just for com pleteness 5 5 Controller layer 5 5 1 Controller container Context Controller container Controller container controllers Controller container controllers Controller container with with Check The controller container must contain at least one con troller You must have an admin con troller for hook subscriber functionality Controller names must be unique Please create an ajax con troller including an arbitrary action like main because it is required for processing your model properly 52 Remarks Since Zikula 1 3 it is highly recommended to have an ad min area as there is an addi tional page for defining hook assignments for different ar eas For example there may not be two controllers which are both named admin This happens if your model layer contains relationships or an entity with either user fields or tree extension As the generator creates addi tonal ajax methods in these cases it requires an ajax con troller for keeping this infor mation also in the model for documentation 5 5 2 Controller Context Controller Controller Custom controller Custom controller Controller Controller with actions Controller with actions Controller with actions
42. cked if the source target field is named id Is only checked if the source and target fields are both not named id For self relation the source field must not be equal to the target field as the database needs two fields in order to store both sides One to one relationship Context One to one relationship One to one relationship One to one relationship Many to one relationship Context Many to one relationship Many to one relationship Many to one relationship Check The edit type AC TIVE_CHOOSE_PASSIVE_N is only valid for many to many relationships The edit type AC TIVE_EDIT_PASSIVE_NONH is only valid for many to many relationships Entities with soft deleteable need a remove cascade for any incoming one to one relation ships Check The edit type AC TIVE_CHOOSE_PASSIVE_N is only valid for many to many relationships The edit type AC TIVE_EDIT_PASSIVE_ NONE is only valid for many to many relationships A many to one relation must not be bidirectional 47 Remarks DNE See this issue for more infor mation Remarks DNE One to many relationship Context One to many relationship One to many relationship One to many relationship One to many relationship Many to many relationship Context Many to many relationship Many to many relationship Many to many relationship Many to many relationship Many to many rela
43. ct field for the corresponding side s of the relationship For more information see the available options 6 5 2 sourceAlias The alias for the source entity required to have multiple associations between the same entities The name should reflect the cardinality on the source side singular or plural forms depending on the relationship type As with all names camel case is preferred for example personAddresses sourceField Name of the source entity fields used for the join The default value is id which means that the source entity is joined by it s primary key It is possible to change that value for custom join conditions Furthermore it is possible to use multiple field names separated by a comma with a space in order to join entities with composite keys targetAlias The alias for the target entity required to have multiple associations between the same entities The name should reflect the cardinality on the target side singular or plural forms depending on the relationship type As with all names camel case is preferred for example personAddresses targetField Name of the target entity fields used for the join The default value is id which means that the target entity is joined by it s primary key It is possible to change that value for custom join conditions Furthermore it is possible to use multiple field names separated by a comma with a space in order to join entities with composite keys 87 e unique A b
44. d pane A composite container which groups its sub containers with tabs Sub container A sub container which may not include other sub containers A sub container may have the following references in addition to the generic container fields e fields Allows referencing one or more fields 86 5 4 e parentContainer Reference to the owning element Panel Inherits from both composite container 36 5 4 and sub container 86 5 4 Search panel A dedicated panel for search functions A search panel may have the following references in addition to the sub container fields e searchButton Allows referencing a submit button 86 5 4 Form Extension of sub container 6 5 4 for form elements Field Represents a field with information It includes the following properties e cssClass Optional specification of arbitrary css classes e defaultValue The default value which may be different from that in the data layer A field may have the following references e fieldContainer Reference to the owning element Display field Shows the value of a certain field from the data layer 102 Input field Shows an input for a certain field from the data layer It includes the following properties in addition to the common field 6 5 4 settings e haslnitialFocus Whether this input should receive the initial focus or not e id Defines the markup element id e isReadOnly Whether this input is
45. ditors Earlier versions of ModuleStudio used to perform a scheduled validation This has been removed to save performance 22 5 2 2 Validation consequences As the generator requires a model without validation problems it can only be started in the main menu after your model has no errors left If the menu entry for starting the generator is inactive even if your models seems to be clean please save the model in the main editor and click once in the diagram canvas to let the validation update it s state accordingly In case live validation has been deactivated you can start a manual validation in the main menu too 5 3 Application layer 5 3 1 Global rules Context Check Remarks Every element with a name The name must be a valid Camel case is recommended identifier e g no whitespace to get more readable mes or special characters sages generated for example mySpecial User 23 24 5 3 2 Application Context Application Application Application Application Application with email set Application with url set Application Application Application Application Application Application with model con tainers Application with model con tainers Check The application must have a name Application name must start with a capital letter The application must have an author The application must have an email address The value for the application email field must be a valid
46. e generated or not Default value is true e generateModerationBlock A boolean specifying whether a moderation block should be generated or not Requires at least one entity with a workflow including approval Default value is true e generateListContentType A boolean specifying whether a content type for collec tion lists should be generated or not Default value is true e generateDetailContent Type A boolean specifying whether a content type for single objects should be generated or not Requires user controller containing a display action Default value is true e generateNewsletterPlugin A boolean specifying whether a Newsletter plugin should be generated or not Default value is true e generateModerationPanel A boolean specifying whether a moderation panel should be generated or not Requires at least one entity with a workflow including approval Default value is true e generatePendingContentSupport A boolean specifying whether support for pend ing content should be generated or not Requires at least one entity with a workflow including approval Default value is true e generateExternalControllerAndFinder A boolean specifying whether a controller for external calls providing a generic finder component should be generated or not Default value is true e generateScribitePlugins A boolean specifying whether support for several Scrib ite editors should be generated or not Requires external controller with finde
47. e ee a a O ae ee 16 FERNE Sue a ee ee a ee 16 gee fess Se E sees cae tap eo de Mena ge Sh ee Dies aves eee A 16 4 31 Main editor o es e ise et RR RR a 16 4 3 2 Model editor e 16 4 3 3 Controller editorl o 16 4 3 4 View editan 16 4 3 5 Workflow editor 2 2 22mm mn 16 4 4 Textual editora a 18 4 5 Useful hats 18 4 5 1 Keyboard shortcuts in graphical editors 18 KUREN 19 4 6 Additional notes 19 4 7 Textual Grammar esca ss s e a He Soe Se Ae a 19 Il Enhanced topics 21 22 eo tr a ba da a e e ee 22 A bone bee een eee a ae eee ee 22 Gate ty avatar Sh es ha ee ee a eas oS 22 bh ee ee Wh Se eo ee oe 23 sa BO usc amp deeb wee we Bade Se Ge Boa Ge aed 23 5 3 1 Global rules ses 2 6 08 e Se eae ead eh in 23 M ds ee ee ee ee ee Se ce es 25 5 3 3 Settings container ee 26 De ie eens Bee Dees a ease Get ate E E 26 5 3 5 Model container ooa 26 5 3 6 Controller container 2 2m m nn 27 6 3 7 VIEW CONtaIMEr u a 6 eA ee ee a Oe ee a a 27 ae Daas Ga ee ks ae es a ee ae 28 5 4 1 Model container 2 o 28 5 42 ENUYE amp 2 o eee 2 Sa sn EERE Re ee ee oe ees 30 8 4 3 Entity field 2 2 20 20 202 0000 0 2 A Aa a ee eee 35 5 4 4 Relationship 2 2 cn nn nn 45 A e daa ee ee Gt Se 50 5 4 6 Variables 51 5 4 7 Other elemental 22 Cm m nn nen 51 A Set Aes Goh Gide Blade ie a ce oh cn 52 5 5 1 Controll
48. e handler Allows referencing an action handler 6 5 3 e incoming Allows referencing one or more transitions 86 5 3 e outgoing Allows referencing one or more transitions 86 5 3 The generator creates sensitive default implementations for all action types except custom actions which do only return an empty template It is possible to create special versions for all templates by adding a suffix which will be assigned by the tpl parameter For example you can call display_myversion tpl by adding amp tpl myversion to the url Note this additional override capability is mainly intended for all actions which have a template for each entity and has therefore not been considered for main and custom actions yet Main action A main action implementation does either do a simple redirect to the view function or if no view is available fetch a simple template file View action The view implementation offers a generic list view of multiple items which can be sorted and filtered Also there are alternative template formats created for atom csv json rss xml and maybe kml support Just add amp userssext 1 to the url or even easier with shorturls change persons html to persons rss Display action A display action results in a generic detail view of an entity Again there are alternative formats supported like for example csv json and xml Edit action The edit implementation creates form pages for changing entities and their relations
49. e one of country language html colour and password String fields for countries languages and colour must also activate the nospace val idator String length must not be greater than 255 for bigger sizes use text fields The default value for an email field must be a valid email ad dress The default value for an url field must be a valid url Remarks Occurs if length is set to 0 If you set a minimum length it must not be larger than the actual field length Occurs if you activate the country property for a field with a length smaller than 2 Occurs if you activate the language property for a field with a length smaller than 5 Occurs if you activate the html colour property for a field with a length smaller than 7 The nospace property ensures that spaces are not allowed as part of the input value The generator could use it with out having set this to true but as the setting is there anyway the proper solution is to enforce the user activating it for consistency Allowed protocols are http ftp and https This section includes rules which apply only for datetime date and time fields 43 Context All date fields Datetime and date fields All date fields Datetime field Datetime field Date field Time field Check A value can not be in the past and in the future at the same time A value can not represent both start and end date at the same time The timestampable
50. edure for measuring the functional com plexity of a software system 11 3 G L Term Generative software architecture GEF GMF GMT Graphical Editing Framework Graphical Modeling Framework GUI Hook HTML IDE Interceptor JET JSF JSP 119 Description Specialisation of a domain architecture for encapsulating technical implementation de tails in the context of architecture centric MDSD Graphical Editing Framework Graphical Modeling Framework Generative Model Transformer Eclipse based framework for the realisation of concrete notations in the form of graphical editors Generative bridge between the Eclipse Mod eling Framework and the Graphical Editing Framework Creates graphical editors based on Ecore based meta models Graphical User Interface Special form of a Zikula application enriches other components by additional functional ity Hypertext Markup Language Integrated Development Environment Special method in PHP which is called au tomatically on certain events Java Emitter Templates Java Server Faces Java Server Pages 120 11 4 M N Term M2M M2T MDA MDD MDSD Meta class Meta meta model Meta model Meta modeling Meta Object Facility Model Model Based Model Driven Model Driven Architecture Model Driven Software Development Module MOF MVC MWE 121 Description Model to Model Model to Text See Model Driven Architecture Mode
51. email address The value for the application url field must be a valid url The application must have a prefix for it s database tables The prefix must be a valid identifier e g no whitespace or special characters The application must have a version The application ver sion must conform to the pat tern X y z The model path property is obsolete and must be cleared The application must contain at least one model container 25 Names of model containers must be unique There should be at least one model container refering to the system s internal data source There must be only Remarks Application name must have a length of at least five chars Since Zikula 1 3 extensions must start with a capital let ter Of course we could sim ply generate it this way But for consistency we decided to follow this rule more strictly by enforcing it in the model already Allowed protocols are http ftp and https This prefix is required to prevent naming collisions be tween several modules Oth erwise it would be a prob lem if multiple extensions use common table names like user or category The prefix must have a length of more than two chars whereby a at least four is recommended Essentially the same as the global rule for names above You should use lowercase here but it will be generated in lowercase in all cases Another requirement intro duced in Zikula 1 3 Valid values are 1 0 0 1 2 2 but
52. er container 2 2 2 Cm m nn 52 55 25 Controller Coi ee WE Be Ea a ek I ee ee 53 B20 Oe AGHO i ane e SO ee Ale a ae a SP ee we OPE eR 54 5 5 4 Action handlerl 222222 CK Eon 54 5 5 5 Action event oaoa 54 5 5 6 Transition 222 2 2 Comm 55 a a a ee ean ae Ge ee eee ee 55 5 6 1 View container ooo a e 55 E E E ba ewe ee ba Se 55 5 6 3 Root panel 56 5 6 4 Other Ulelements 0 0 0 0 0000 eee sit 56 5 6 5 Layout order s s ss se eto ed waatea a edea p ie 56 5 7 Workflow layer 2 2 ee 56 5 8 Additional notes x 4 22 8 we Pd da da 57 58 a aa a AAA 58 ee Ae ee Som a ee eee ee ae a 58 6 3 HOW it works 4 6 8 3 2 4 4 4 2504 8 0 6 hee eee oe bed Soke eS 59 6 3 1 Input dialogs 2 22 22 Coon nn 59 eee Bae EE ee ir fee 59 6 5 Generator reference 2 a 60 a ey ge wy Go eens eee ee es cee ea ee 61 BiG Se ho Hee ea ts ee ee ee ee eee eee eb 68 ae Cages Be Bee Ate ears A 97 cs PS Se om ey NG e e GN a sr tee Bee 100 SR ys Br ae Scien ae ee a E q teen a ta HS 106 6 6 Additional notes e e ss a ma pa E E a a a i a e E E RES 106 107 A T E es es ee ee E EE ETE O 107 a Sig cst a a A 107 7 2 1 Keep consistetl o 107 a o Ec ES ee ek ee N 107 7 2 3 Use overriding ee 107 7 2 4 Code additi nsl 2 ss eae 824 45 o ee eS 108 7 2 9 Use versioning kamao ka rama kaa 108 7 3 Additional motes 108 109 ges O
53. esponding Per son classes but also an en tity named PersonLogEntry for managing the version log entry entities For an entity named person ModuleStudio does not only generate corresponding Per son classes but also an en tity named Person Translat able for managing translation entities For an entity named person ModuleStudio does not only generate corresponding Per son classes but also an en tity named PersonClosure for managing the closure entities For an entity named person ModuleStudio does not only generate corresponding Per son classes but also an en tity named PersonAttribute for managing the attribute entities For an entity named person ModuleStudio does not only generate corresponding Per son classes but also an en tity named PersonCategory for managing the category en tities For an entity named person ModuleStudio does not only generate corresponding Per son classes but also an en tity named PersonMetaData for managing the meta data entities 34 5 4 3 Entity field General field settings Context Entity field Entity field Entity field Entity field Entity field Entity field Entity field Entity field Entity field Entity field Entity field Entity field Check Field must be assigned to an entity Every field must have a name Field names must be unique Field name is a reserved iden tifier module type func lang theme Field name is a re
54. etting with file path values It includes the following properties in addition to the common variable 6 5 2 set tings e withinDocRoot A boolean specifying whether this path is placed inside the web root or not The default value is true e writable A boolean specifying whether this file path is writable or not The default value is false The generator will create a text input element for a file path variable as well as additional behaviour to consider it s fields properly At the moment this has not been done yet though so file path vars are currently handled in the same way like text vars List var Represents a setting with list values It includes the following properties in addition to the common variable 6 5 2 set tings e multiple A boolean specifying whether multiple items can be selected concurrently or not The default value is false A list variable may have the following references e items Allows referencing one or more items 6 5 2 The generator will create a select element for a list variable At the moment this has not been done yet though so list vars are currently handled in the same way like text vars List var item Represents an entry for a setting with list values It includes the following properties e default A boolean specifying whether this entry is selected by default or not The default value is false e name Name of the item The generator will create an option
55. field Represents a field type for storing integer numbers An integer field has the following properties in addition to the common abstract integer field 6 5 2 settings e aggregateFor Aggregate field one to many target alias and field name syntax views amount which causes the generator creating special methods for aggrega tion e maxValue Maximal value If set to a value other than O then a validator will enforce this constraint on client and server side e minValue Minimal value If set to a value other than O then a validator will enforce this constraint on client and server side version A boolean specifying whether this field should act as a version If set to true the owning entity will need to use loptimistic locking 6 5 2 There is no user interface for version management generated yet In edit 6 5 3 pages the generator will use int input elements as well as validation on client and server side For the output in view 6 5 3 and display 6 5 3 templates the value will just be shown Decimal field Represents a field type for storing decimal numbers A decimal field has the following properties in addition to the commonlentity field 86 5 2 settings e aggregationField A boolean specifying whether this field should act as an aggre gate field If set to true the generator creates special methods for aggregation 74 e currency A boolean specifying whether this field should be
56. field in the same en tity Can appear for datetime and date fields if you enabled the startDate property for more than one field in the same en tity Can appear for datetime and date fields if you enabled the endDate property for more than one field in the same en tity Can appear for integer and datetime fields with the ver sion property enabled You must set the locking type of the corresponding entity to either OPTIMISTIC or PAGELOCK_OPTIMISTIC depending on whether you want support the Zikula PageLock functionality in addition or not a mk O A E O AA AN 41 Numeric fields Context Integer and user fields Integer field Integer field Integer field Integer field Integer field Decimal field Decimal field Decimal field Float field Float field Check The default value for an in teger field must contain only digits The maximum length for an integer field is 18 Minimum value must not be larger than maximum value Entities with an aggregate field should use a locking strategy optimistic or pes simistic read Aggregate fields work only in combination with an outgo ing and bidirectional one to many relationship with per sist cascade Naming of aggregateFor attribute values must fol low the syntax targetAl ias targetFieldName for example views amount The default value for a dec imal field must be a floating point number The length precision of a decimal
57. general terms for modeling MVC applications As you will see later an application model has different submodels for describing correspond ing architectural layers model controller view 2 2 1 Meta model The meta model defines the essential concepts of the ModuleStudio language that is which model elements may exist and how they are allowed to work with each other This allows reusing the basic domain concepts at several places like validation editors generators and so on 2 2 2 Constraints In addition to the meta model there arelmany validation rules 5 to enrich the modeling language with more precise knowledge These constraints ensure that the generator can only be started for valid models 2 3 Modeling Editors The user interface consists of different types of editors which may include event different kinds of how information is described 2 3 1 Graphical Graphical notations are convenient for modeling edges between different nodes They are not that well suited for creating huge lists of similar elements for instance ModuleStudio offers graphical editors for creating and changing models for describing different applications See theluser interface chapter 4 for more information 10 2 3 2 Textual A textual syntax is very nice for rapid creation of structures It becomes less handy for relationships At the moment there is no textual editor included in ModuleStudio This is going to change soon thoug
58. h 2 3 3 Structural Structural views for example trees are another possible viewpoint for describing a model At the moment there is no structural editor included in ModuleStudio This may change in future though 2 3 4 Hybrid In future of ModuleStudio is heading towards some kind of hybrid modeling where you can combine textual and graphical editors for describing applications 2 4 Generators The generators add technical details depending on the target system Their task is creating source code or other artifacts from application models 2 4 1 zClassic The primary generator cartridge is zclassic which creates a Zikula extension You can read more about this in the generator chapter 86 Also important is another chapter about customisation and maintenance 7 of generated applications 2 4 2 Reporting The reporting cartridge creates some documents from a given model Please continue here for details 8 2 2 5 Additional notes None yet 3 Getting started This chapter explains the first steps required for starting creating applications with ModuleStudio For now we refer only to existing tutorials as they describe things still quite well 3 1 Installation Simply download the archive for your operating system and extract it inside your home directory After that you are ready to start the ModuleStudio executable Note ModuleStudio requires Java in at least version 7 If no JRE Java Runtime Environment
59. iate asutime at attach attributes audit authorization autoincrement aux auxiliary avg backup before begin between bigint binary blob both break browse buffer pool bulk by cache call called capture cardinality cascade cascaded case cast ccsid change char character check checkpoint clone close cluster clustered coalesce col late collection collid column comment commit committed compress compute concat condition conflict connect connection confirm constraint contains con tainstable continue controlrow convert count count_big create cross current current_date current_lc_ctype current_path current_schema current_server cur rent_time current_timestamp current_timezone current_user cursor cycle data database databases datapartitionname datapartitionnum date day days day_hour day_microsecond day_minute day_second db2general db2genrl db2sql dbcc dbinfo dbpartitionname dbpartitionnum deallocate dec deci mal declare default defaults deferrable deferred definition delayed delete dense_rank denserank deny desc describe descriptor detach deterministic di agnostics disable disallow disconnect disk distinct distinctrow div distributed do document double drop dssize dummy dual dynamic each editproc else elseif enable encoding encryption end enclosed end exec ending erase errlvl errorexit escape escaped every excep
60. ications without having to load the workflow in all cases In fact ModuleStudio adds it as alist which contains a for each state Note that it is easily possible to model which set their value automatically depending on a certain workflow state Just set their timestampable type to CHANGE and set workflowState as change trigger field Also set the change trigger value to the name of the desired state So you could for example create an approval date by using approved for the trigger value property Entity index Represents an entity index 85 It includes the following properties e type The index type An index may have the following references e entity Reference to the owning element e items Allows referencing one or more index items 6 5 2 Entity index type Represents different types of entity indexes 6 5 2 Can be one of the following options e NORMAL Normal index e UNIQUE Unique constraint The generator transforms these values to the corresponding implementation as is There are no differences made between the different index types So beside the actual entity class there won t be any code parts affected based on which index type you use Entity index item Represents a part of anlindex 6 5 2 referencing to an equally named entity field 86 5 2 An index item may have the following references e index Reference to the owning element Relationship Base class for all types of associat
61. ide the postLoad listener But now we have to call it elsewhere Therefore we need something in the controller actions like the following for bypassing the problem single entity myEntity gt initWorkflow collection of entities foreach Sentities as k gt Sentity Sentity gt init Workflow f Note you must call this for all fetched entities not for new ones as the call is still included in the constructor 114 This solution approach is a bit ugly because we require you the mod dev calling this explicitly from the using code If you forget it in a certain method workflows are not initialised properly Of course this will be improved again as soon as Doctrine 2 offers the new event which happens really post fetch 10 5 4 Patch for category selector Due to a bug in the category selector in Zikula 1 3 5 and 1 3 6 solved in 1 3 7 you will run into problems when trying to save an entity with categories To solve this just merge the fix shown in https github com zikula core pull 1561 files and you are done 115 116 11 Glossary 11 1 A C Term Abstract syntax AC MDSD Agile Software Development AOP AOSD API Architecture Centric MDSD Aspect Oriented Software Development BNF Business use case Cartridge Cascaded MDSD CCC Cheatsheet CMOF Concrete syntax Constraint Cross Cutting Concern CSS CVS 117 Description Technology independent part of a domain
62. ile this implementation approach is quite elegant it is not completed yet in all areas unfortunately At least during installation everything should be fine When working with the application you will notice that inherited fields are handled well but additional fields from the parent classes are not considered yet everywhere See 46 for more information Inheritance strategy type The strategy type defines which kind of inheritance strategy should be used Can be one of the following options e SINGLE_TABLE Simple inheritance share everything and store it in the parent table e JOINED Concrete inheritance each entity stores everything in its own table The generator transforms these values to the corresponding implementation There are no differences made yet between the different strategies So beside the actual entity class there won t be any code parts affected based on which strategy you use Variables Container class for carrying module vars It includes the following properties 93 e sortOrder The sorting position for when using multiple variable sections A var container may have the following references e container Reference to the owning element e vars Allows referencing one or more variables 86 5 2 As soon as at least one variable container exists the generator creates a config page in the admin area to let the site admin manage corresponding settings If a model contains multiple variable containe
63. in on pages There is no included support yet for arbitrary attributes like they are known from the Categories administration area While the display side is ready for that the edit page needs some dynamic support for creating new attributes on the fly e categorisable A boolean specifying whether this entity should have categories or not If set to true the generator creates an additional entity for managing the categories During edit 86 5 3 actions it is possible to select a desired category This category will also be shown again on display 6 5 3 pages and in quick navigation forms of pages Generated applications support filtering by categories as well as multiple category registries properties trees however the implementation uses only Main per default There is no built in permission scheme based on categories implemented yet Note that if you activate the categorisable property for an entity the generated installer relies on that you did not remove the default categories of Zikula If you deleted them please set the amount of example rows to 0 to avoid problems e categorisableMultiSelection A boolean specifying whether multiple categories can be selected or not e changeTrackingPolicy How change detection is being done see below 86 5 2 The default value is DEFERRED_IMPLICIT 68 displayPattern Pattern for displaying instances of this entity In earlier Mod uleStudio versions one had to mark one entity field
64. in the entity is preferred against marking leading fields Also every entity may include only one field defined as leading The entity needs a display pattern Using display pattern in the entity is preferred against marking leading fields The display pattern does not contain anv field references Remarks Should not occur in practice this is just for completeness Entity multiple name must have a length of at least two chars Should have at least four chars Underscores are not allowed as they are used for class au toloading Ensures that either there are some fields in this entity or an outgoing inheritance rela tionship This warning appears be cause ModuleStudio adds pri mary keys automatically and uses the Doctrine 2 default settings if nothing else is ex plitely specified in the model Beside special use cases like custom join conditions or composite primary keys you won t need to set primary keys manually This warning appears if a field is named like id or per sonid or person_id for an en tity named person In these cases ModuleStudio adds pri mary keys to this table auto matically before the genera tion Automatic identifier genera tion is not possible for com posite primary keys Occurs when a display pat tern is defined but also a field is marked as leading Occurs when no display pat tern is defined but multiple fields are marked as leading Occurs when no display pat te
65. ion This sections collects information snippets which may be helpful when running into problems 10 2 General hints 10 2 1 Pathes with space chars Eclipse has problems with pathes containing space chars Therefore avoid spaces to ensure things work correctly 10 3 Tooling problems 10 3 1 Boolean properties can t be unset Due to a bug it can happen that unsetting a boolean flag will not be persisted in the model file To work around this please remove the flag using a text editor 10 3 2 I can t open my model again When reopening a model does not work but just an empty editor tab is shown something in the workspace data became stale or corrupt To fix this please delete the folder named Most Workspace in your user directory See also ticket 254 for some information about that problem 10 3 3 The diagram looks broken If model and diagram do not fit together anymore which can happen when the model language evolved you see something like the following This is no big problem though as you can create a new diagram for your application model with ease 1 Close the model 2 Delete the mostdiagram file 3 File gt Initialize diagram file 112 Figure 10 1 Broken diagram 4 Choose the mostapp file 5 Click on the next button 6 Click on the finish button 10 3 4 can t save my model If you get an error message when trying to save your model this means that it is not possible to serialise the ob
66. ions between entities It includes the following properties e bidirectional A boolean specifying whether this relationship is bidirectional or not The default value is false for performance reasons A relationship may have the following references e container Reference to the owning element e source Allows referencing altarget entity 86 5 2 e target Allows referencing a source entity 6 5 2 86 Join relationship Collects all foreign key and join relationships It includes the following properties in addition to the common relationship 86 5 2 settings cascade The cascade type 6 5 2 used on application level from source view cascadeReverse The cascade type 6 5 2 used on application level from target view only for bidirectional relationships edit Type The edit type 6 5 2 for this association only applicable if useAuto Completion is not set to NONE fetchType The fetch type 6 5 2 for this association nullable A boolean specifying whether the field for this relationship may be null or not The default value is true onDelete String for optional update cascade options on database level for exam ple RESTRICT or SETNULL onDelete String for optional delete cascade options on database level for example RESTRICT or SETNULL useAutoCompletion If set to any value except NONE the generator will cre ate an auto completion field instead of a normal dropdown sele
67. ject graph you have currently opened in the memory The probable reason for this is that there exists a reference to an element without a name Therefore the serialiser sees no way to persist this reference For example if you have two entities and a relationship between them then all these three elements need a name Because if an entity has no name then the relationship can not store it s source or target reference If the relationship itself has no name then the entities can not store it in their list of incoming or outgoing relationships To fix this just ensure that all existing elements have a name In a later version the ModuleStudio tooling is going to get more support for setting sensitive default values to overcome this issue but this feature addition has no high priority at the moment 10 4 Migration problems 10 4 1 Migrating my existing model causes an error Before converting your existing model make sure that you have removed any account controller and search controller elements in MOST 0 5 4 113 10 5 Generation problems 10 5 1 Unable to find workflow file If you get this error you have generated an application for Zikula 1 3 x which contains a small bug that is fixed in 1 3 7 Please apply the fix shown in https github com zikula core commit f7e33 in order to fix the error 10 5 2 Orphan removal with many to many relations If you are generating for 1 3 x please do not enable the orphanRemoval property for
68. l If at least one field in an entity has a sluggable position greater than 0 then this entity is considered as sluggable In this case a permalink is built automatically from all fields in ascending position See the slug properties on entity level 6 5 2 for slug related configuration options e sortableGroup A boolean specifying whether this field acts as grouping criteria for the sortable extension The default value is false SortableGroup is not fully implemented yet do not use if you not understand the function e translatable A boolean specifying whether this field is translatable or not The default value is false If at least one field in an entity is translatable the generator creates an additional class for managing the translation entities Overall support for translations in the application should get you started e unique A boolean specifying whether this field is unique or not The default value is false If set to true then an additional validator cares for enforcing the unique constraint on client and server level All fields are implemented as entity class member vars The following sections will look at the different field types in detail Calculated field Represents an entity field which can dynamically compute it s value based on other fields A calculated field may have the following references in addition to the common field 6 5 2 settings e operands Allows referencing one or more derived field
69. l Driven Development See Model Driven Software Development Instance of a meta model element in the form of a generated class Defines possible elements and relations for meta models Abstract syntax of a domain specific lan guage Is created based on a meta meta model in the meta modeling process Abstract definition of the core concepts of a domain in the form of meta models Based on findouts in the domain analysis Standard for meta meta models adopted by the Object Management Group A simplifying presentation of structures functionalities and progress forms Rep resents an application in the model driven software development which is described in an abstract form In model based systems models are the base for an application They serve for documentation and basis for generating a program skeleton Model driven systems use domain specific languages in order to be able to create soft ware completely from models Standard for the realisation of software sys tems with a separation of technology inde pendent and dependent parts defined by the Object Management Group Pragmatic development paradigm for gen eration of software from models See also model driven The module mo du le is a building block in general a part of a bigger system In infor matics it stands for a unit which is assem bled by multiple elements and can be ex changed at any time See Meta Object Facility Model View Controller Model Workflow
70. le online Suspended content has been approved but is temporarily offline Only available if the entity has set the hasTray property to true Archived content has reached the end and became archived Only available if the entity has set the hasArchive property to true Requires aldatetime 6 5 2 or date 6 5 2 field being designated as end date Trashed content has been marked as deleted but is still persisted in the database Only available if the entity has set the softDeleteable property to true Note that the soft deleteable implementation is not done yet as this requires the 1 4 0 core of Zikula Deleted pseudo state for content which has been deleted from the database 84 ownerPermission reject edit accept edit STANDARD ENTERPRISE for NONE directly to APPROVED Pending Content submit approve add ppe ancaddesip ppe ancadde unpublish edit hasTray publish edit update edit archive edit or automatic enddate hasArchive DESTRUCTION trash add softdeleteable Figure 6 4 Workflow overview The following image shows an overview of all possible workflow states and actions The current state for a certain object is stored in the workflow itself Furthermore ModuleStudio creates an additional field named workflowState to each entity before starting the generation This allows for easier filtering and other useful appl
71. leteness The index name must have a length of at least two chars Recommended are at least four chars The limit is 1000 bytes while UTF 8 requires three bytes for each char Should not occur in practice this is just for completeness This occurs if no equally named field is found in the entity 5 4 6 Variables Context Variable container Model container with vari able containers Model container with vari able containers Variable container Variable container Variable Variable Variable List var 5 4 7 Other elements Context Calculated field Entity event listener Transform object Check Every var container must have a name Var container names must be unique Var container sort positions must be unique Every var container must contain at least one variable Var container must be as signed to a model container The var must be assigned to a container Every var must have a name A var must not have the same name as an entity The list must contain at least one item Check The field must rely on at least one derived field The listener must contain at least one operation Every transformation must be assigned to an event lis tener 5l Remarks Should not occur in practice this is just for completeness Should not occur in practice this is just for completeness The var name must have a length of at least two chars Recommended are at least four
72. lication Usually this is the full name of the devel oper e email The email address of the developer e license The license of this application Defaults to LGPL If either GPL or LGPL are used the generator creates corresponding license files too e url The homepage of the developer e version The application version Must conform to the pattern x y z for example 1 0 0 which is also the default value Will be used in the version class of the created extension These basic fields are mainly used by the generator to create a meaningful file header An application has some more fields for specifying specific aspects e applicationType The kind of application described by the model See low 86 5 1 e targetCore Version The targeted Zikula core version See below 86 5 1 Note this setting is obsolete on application level Please use the settings container 86 5 1 property instead e interactivelnstallation A boolean specifying whether an interactive installation should be used or not The default value is false which lets the generator create a normal installer without any required user input If you set it to true it will additionally generate some init templates as well as a corresponding controller for the interactive installer Important note support for interactive installers is currently disabled as this topic is broken and being overhauled in the Zikula core e modelPath Physical file path to the applicatio
73. lient and server side e minValue Minimal value If set to a value other than O then a validator will enforce this constraint on client and server side In edit 6 5 3 pages the generator will use float input elements as well as validation on client and server side For the output in view 6 5 3 and display 6 5 3 pages the value will just be shown using the formatnumber modifier Abstract string field Represents an abstract string field for grouping different implementations of this field type An abstract string field has the following properties in addition to the common field 6 5 2 settings 75 fixed A boolean specifying whether this field has a fixed length or not e minLength Minimal length If set to a value other than O then a validator will enforce this constraint on client and server side e nospace A boolean specifying whether space chars are forbidden or not e regexp Regular expression to validate against If one of these properties is set to true a corresponding validator will check this con straint on client and server level String field Represents a field type for storing string values A string field has the following properties in addition to the common labstract string field 86 5 2 settings e country A boolean specifying whether this field represents a country code or not If set to true a country selector is used in edit 6 5 3 pages For the output in view
74. list field may have the following references e items Allows referencing one or morelitems 6 5 2 The generator creates an additional class for handling the available list items centrally Based on this information edit 86 5 3 pages provide either a dropdown list for single or multiple values depending on the multiple property or a checkbox list if multiple and useChecks are both set to true For the output in and display 86 5 3 templates there is a modifier generated which cares for showing the names instead of the raw option values List field item Represents an entry for a list field It includes the following properties e default A boolean specifying whether this entry is selected by default or not The default value is false e name Name of the item e image Optional name of an extrasmall image in the Zikula core for example xedit See the list field 6 5 2 section for a description of what the generator does with those elements Array field Represents a field type for storing arrays An array field has no fields or references in addition to the common entity field 86 5 2 settings The generator will exclude arrays in pages as well as for the output in and templates Object field Represents a field type for storing objects An object field has no fields or references in addition to the common entity field 86 5 2 settings The generator will exclude objects in edit 86 5 3 page
75. ll have to do after regen eration For example after you added some fields later on or you got a new generator version fixing some bugs and so on you will want to know again where you did which changes for which reason Usually a good place for this documentation is modules Y ourModule docs customisation tat 7 2 3 Use overriding All cosmetic enhancements can be done by template overriding in Zikula For example you can place custom templates in config templates YourMod during development Note that if legacy mode is turned off template overriding will not work automatically In the past Zikula performed a file system scan several directories for each template which was very convenient but also bad for performance Now you have to describe overrides in the file template_overrides yml explicitely instead So when custom templates are placed in the config templates YourMod folder this is fine for development It is even recommended for the module developer to keep things separated during development and in Git see below so that he can always distinguish 107 and compare between generated and customised templates since this makes things easier if the module is regenerated again in future When using a module in production things are a bit different A site owner may want to further customise some templates so the config directory should not be used by the module itself out of the box This is not really a technical problem
76. n areas yet There are some expressions which must be rechecked in order to limit some generation parts to certain container element instances only So it can happen for example that several data layer artifacts from additional data sources are treated like if they were part of the primary internal one Therefore it can also be that the relations between your containers are not reflected as you would expect it To some degree this can also be a result of missing dependencies like for example missing editor capabilities to design the view areas 67 So for the moment multiple containers are often treated like if they were one big merged container With time this will change though as more and more expressions become more explicite including or rejecting certain model elements more precisely 6 5 2 Model layer The model layer in ModuleStudio has been designed for a precise description of entities and associations To understand all the elements and properties please read the Doctrine 2 documentation before Language elements Entity Represents an entity in the data layer which is mapped to a database table It includes the following properties e attributable A boolean specifying whether this entity should have attributes or not If set to true the generator creates an additional entity for managing the attributes During edit 86 5 3 actions it is possible to input values for three predefined attributes These will also be shown aga
77. n is an essential part of a modeling language By checking the current model against several constraints it ensures that certain scenarios can not happen in order to avoid problems based on invalid states of model elements With the help of validation in ModuleStudio all subsequent components can process the given application model without having to revalidate common concerns Having clean and properly validated models is also very helpful for Zikula as a frame work because in the long term this leads to a constantly high quality across third party extensions which is traditionally a weak point for every open source system See tutorial for more information about this aspect The constraints described here are evaluated within the graphical editor as well as during headless generator workflows 5 2 Basic usage This section gives a brief overview of how validation can be executed and what can be done if problems occur 5 2 1 Triggering validation As validation shows what remains to be done in order to generate an application out of a given model it is essential to provide convenient means for checking validation constraints ModuleStudio validates a model every time you save it in the main editor Validation is also executed after an existing model has been opened In addition you can always start the validator manually using the main menu which might be advantageous to get immediate feedback after having done some amendments in the sub e
78. n model This is obsolete and will be removed in a later version Please keep it empty e prefix A prefix for all database tables of this application Will be used in entity classes An application may furthermore have the following references e controllers Allows referencing one or more controller layers 6 5 1 e generatorSettings Allows specifying desired generator features and behaviour More details in the settings container 6 5 1 section e models Allows referencing one or more model layers 86 5 1 e referredApplications Allows referencing other applications See below 86 5 1 e views Allows referencing one or more view layers 86 5 1 62 Property Value boeren Autor IS Axel Guckelsberger Dokumentation Comprehensive recipe and menu management E Mail nfo guite de Name RecipeManager Pr fix recman URL http modulestudio de Version 1 0 0 v Weitere Optionen Anwendungsart l WEB Interaktive Installation Lizenz i http www gnu org licenses lgpl html GNU Lesser General Public License Modell Pfad IE home axel RecipeManager mostapp Referenzierte Anwendungen Figure 6 3 Application properties Application type The kind of application described by the model Can be one of the following options e WEB Web applications This is the default value e NATIVE Native applications e EMBEDDED Embedded applications At the moment this value is comple
79. ne Go to a certain line Maximize current editor window Close current editor tab Go to last edit location Start the source code formatter Find references to current element Locate a certain element Here is a railroad chart showing the textual grammar elements 19 etme nee Figure 4 4 Textual grammar 20 Part Il Enhanced topics 5 Validation This chapter explains the intention behind validation in ModuleStudio The biggest part is a reference section listing all validation rules in detail and explains the motivation behind them You can use this reference to search for certain error messages if you want to know more about the background If you are unsure about the terminology used in a description please refer to the generator chapter 6 in this documentation 5 1 Introduction Validatio
80. nsion e UPDATE On update e CREATE On create 83 e CHANGE On property change The generator transforms these values to the corresponding implementation as is There are no differences made between the different timestampable types So beside the actual entity class there won t be any code parts affected based on which timestampable type you use Entity workflow type Represents different workflows for entities Can be one of the following options e NONE No approval e STANDARD Single approval e ENTERPRISE Double approval In total there are nine different workflow states which are explained below Note that you can arrange many states by corresponding properties in the model 1 2 Initial pseudo state for content which is just created and not persisted yet Deferred content has not been submitted yet or has been waiting but was rejected Only available if the entity has set the ownerPermission property to true Allows users to manage their contributions Otherwise rejected content would be deleted Waiting content has been submitted and waits for approval Only available for STANDARD and ENTERPRISE Fetched for pending content integration and moderation panel Accepted content has been submitted and accepted but still waits for approval Only available for ENTERPRISE Fetched for pending content integration and moderation panel Approved content has been approved and is availab
81. nt11 true false ur string false false langcode stringS false Fals pageSize lint useDrinkExtensions bool useRatings bool E image alse downloadrile upload false tals H ingredientCategory Falsi tile atring255 true true image upload true falz creationDate datetime false fals zipcode string10 false f totalDuration int11 false additi additionalObject object falze fala recipeVersion int11 true false 1 recipe has n ingredient El recipeingredient ham list terr pdf list Rem m categories have n ingredient Kassierer 01005850 eF athe le ving255 true true string255 amount decimall 0 2 true tru 1 recipe has n step Hredpestop Hal 1 ingredient has n recipe description string255 true true nValue int11 true false isPassive bool t durationMinutes int11 true false 1 step has n ingredient has n unit 1 ingredient has cipeStepingredient alse HingredientUnitAssignment Hals impertParh Gilepath rezourcePath filepath pdfStoragePath filepatl menuStoragePath ilepat supplierPhone string255 altemativ eid int11 False m mainingredients have n atemativ elngredier n unit n useringredients have 1 ingredier Huseringrediert False amount decimall 0
82. ntifier strategy you use Entity change tracking policy Represents different policies defining how changes are determined Can be one of the following options e DEFERRED_IMPLICIT Compare properties during commit Convenient but not good for performance e DEFERRED_EXPLICIT Scan only entities marked for change detection Better performance but no dirty checking e NOTIFY Assume that entities inform listeners about their changes The generator transforms these values to the corresponding implementation as is For notify the generator creates according notification calls within the entity setter methods Entity lock type Represents different locking strategies for entities Can be one of the following options e NONE No locking support e OPTIMISTIC Optimistic locking e PESSIMISTIC_READ Pessimistic read locking e PESSIMISTIC_WRITE Pessimistic write locking e PAGELOCK Use PageLock module e PAGELOCK_OPTIMISTIC Use PageLock module combined with optimistic locking e PAGELOCK_PESSIMISTIC_READ Use PageLock module combined with pes simistic read locking e PAGELOCK_PESSIMISTIC_WRITE Use PageLock module combined with pes simistic write locking The generator transforms these values to the corresponding implementation as is If you use optimistic locking the entity needs a version field which can be anlinteger 86 5 2 or datetime 6 5 2 field whereby an integer is preferred If you choo
83. o gram parts A typical example is the logging of errors Cascading Style Sheets Concurrent Version System 11 2 D F Term Doctrine Domain Domain analysis Domain architecture Domain Specific Language DSL Eclipse Modeling Framework Ecore EJB EMF EMOF Framework Function point analysis 118 Description An ORM layer for PHP represents the inter face between objects in an application and the relational data storage behind it A limited area of knowledge or interest rep resents a problem space from the real world in most cases Process within the meta modeling cares for finding commonalities and differences be tween different members of a software sys tem family From the area of product line engineering marks the sum of a domain specific language and the platform on which the applications realised with it are executed A language offering precise means for ex pression for a domain Contains an ab stract syntax as well as concrete notations and transformations for further processing of created models Domain Specific Language Flexible and powerful framework for Ecore based meta modeling Meta meta model implemented in the Eclipse Modeling Framework compatible to the Meta Object Facility Enterprise Java Beans Eclipse Modeling Framework Essential MOF Collection of libraries and functions provid ing a well defined frame for implementations of a programming language Proc
84. o specify the sorting criteria for the outgoing relation e orphanRemoval Default value is false If set to true orphans get removed auto matically Many to one relationship Represents many to one relationships It includes the following properties in addition to the common join relationship 86 5 2 settings e primaryKey A boolean specifying whether the foreign key of this relation should act as a primary key The default value is false Please note that this has not been tested yet and probably won t be supported properly yet by the controller layers in the generated application 88 Many to many relationship Represents many to many relationships It includes the following properties in addition to the commonl join relationship 86 5 2 settings inderBy Set to target field name must be unique to specify the index by criteria for the relation Please note that this has not be tested very well yet orderBy Set to target field name to specify the sorting criteria for the outgoing relation orderByReverse Set to source field name to specify the sorting criteria for the incoming relation refClass Specifies the reference class created for the linking table for example per sonAddress The generator creates additional classes for this reference managing entity Cascade type Represents different cascade types on application level Can be one of the following options NONE PERSIST REMOVE MERGE DETA
85. ocumentation and reporting tasks 6 2 Basic idea Every application consists of different types of code parts While some code is unique for each application most parts can be derived from that and is therefore very similar for a whole software systems family Those code parts are known as boilerplate code A very simple example will make this clear very quickly pes imagine some long comments about this class here ORM Entity some more annotations class MyModule_Entity_ Person extends Zikula _ EntityAccess pex imagine some long comments about this field here GORMA Column some more annotations 2 protected firstName pex imagine some long comments about this field here GORMA Column some more annotations protected lastName 58 This code has obviously not very much knowledge which is essential for this certain application Reduced to what is really required from a functional view one would get something like entity person string firstName string lastName i Thought a little further the generator helps reaching a constantly high code quality as all implementation details are always considered completely For example if a new extension is activated for an entity this is not forgotten anywhere inside the code 6 3 How it works There is a tutorial showing how calling the generator within ModuleStudio looks like Using the generator The only requirement is th
86. odule false Cid int4 true false id int4 true fals catname string32 true false mid int4 true false description string254 true false cid int4 true false order int4 true fals order int4 true fals sid int4 true false title string255 true false urltitle string255 true false hometext text2 000 true false bodytext text2 000 true false counter int4 true false informant string20 true false notes text2 000 true false home int1 true false language string30 true false withcomm int1 true false FormatType int1 true false PublishedStatus int1 true false from datetime true false to datetime true false Figure 3 2 News module 14 EE ITE AN CAE ATA int4 true false d int4 true false parentPageld int4 true false eld int4 true false title string255 true false realndex int4 true false showTitle intl true false position int4 true false urlname string255 true false module string100 true false metadescription text2 000 true fals type string100 true false metakeywords text2 000 true false data text2 000 true false nohooks int1 true false active intl true false FE content_searchable fals layout string 100 true false visiblefor intl true false contentld int4 true fal
87. oller terminology independent from technical stuff More information can be found in these articles e Advantages of ModuleStudio e How MDSD reduces costs for long term maintenance of comprehensive software system families e From scaffolding and UML to MDSD and DSL 1 3 About this manual This user manual is going to provide all required information to work with ModuleStudio Furthermore it serves as a reference for all details of the generator This document should be available in several formats e help within ModuleStudio e online help on our website e pdf print version In future versions we are going to add interaction capabilities to incorporate active help into ModuleStudio itself while you are working For now the focus was to get the manual actually written 1 4 Model layers A ModuleStudio model is divided into several submodels in order to separate concerns This section shows the different layers and their role for the overall application It is just a brief overview which does not explain single fields or settings in detail This will be done in later chapters instead 1 4 1 Application layer The application layer is the overall container where all sublayers are linked together In addition it contains a bunch of application wide properties with which general aspects are defined like for example the name and the author of an application 1 4 2 Data layer Each data layer defines a logical group of data st
88. ommon templates which are included or required for some extensions Language elements View The base view class Each view instance would correspond to a template in the generated Zikula application The following view types are available e List view 100 e Detail view e Edit view e Custom view A view may have the following references e viewContainer Reference to the owning element e viewRoot Reference to root panel Tables The following table types are available e Layout table is alcomposite container 6 5 4 e Data table is alsub container 6 5 4 Container Represents a very generic container A container may have the following references e cancelActvators Allows referencing one or more cancel activators 6 5 4 e submit Activators Allows referencing one or more submit activators 86 5 4 Root panel Top level container for a certain view A root panel may have the following references in addition to the generic container fields e containers Allows referencing one or more composite containers 6 5 4 e presenter Reference to the owning element Composite container A composite container which may include other sub containers A composite container may have the following references in addition to the generic container fields e childContainer Allows referencing one or more sub containers 86 5 4 e rootPanel Reference to the owning element 101 Tabbe
89. ompleting the user interface 4 2 Basic usage Please see this tutorial 4 3 Graphical editors 4 3 1 Main editor Please see 4 3 2 Model editor Please see 4 3 3 Controller editor Please see 4 3 4 View editor The view editor has not been implemented yet This section is therefore just a dummy for future 4 3 5 Workflow editor The workflow editor has not been implemented yet This section is therefore just a dummy for future 16 4 Palette Raa gt Basis Werkze E Entit t Entit ts Index Index Eintrag X Variablen 2 Feld Typen td Boolean Integer Dezimalzahl A String A Text 3 Var Typen 4 Bool Var Y Int Var y Text Var Y DateipFad Var y Liste Var 3 Links A Eins Zu Eins Beziehung A Eins Zu Viele Beziehung A Viele Zu Eins Beziehung Raap Container x E Model Neuen Container zur Datenspeicherung erstellen 1 Controller Neuen Container f r Pageflow Controller erstellen View Neuen Container f r Pr sentations Elemente erstellen Links A Model Abhangigkeit Model an Controller zuweisen title string255 true true description text1 0 000 fal amountOfPortions int3 t author int Etrue fal menuPosition has n recipe m recipes have n area 1 category has 1 imag image y Controlle name string255 true true yortValue i
90. ond secqty security select sensitive separator sequence seri alizable session session_user set setuser share show shutdown signal simi lar simple size smallint snan some soname source spatial specific sql sql buf sqlexception sqlid sqlstate sqlwarning sql_big_result sql_calc_found_rows sql_small_result ssl stacked standard start starting statement static statistics statment stay stogroup stores straight_join style substring successful sum summary synonym sysdate sysfun sysibm sysproc system system_user table tablespace tape temp temporary terminated textsize then time times tamp tinyblob tinyint tinytext to top trailing tran transaction trigger trim true truncate tsequal type uid uncommitted undo union unique unlock unsigned until update update text usage use user using utc_date utc_time utc_timestamp 37 vacuum validate validproc value values varbinary varchar varchar2 varchar acter variable variant varying vcat verbose version view virtual volatile vol umes waitfor when whenever where while with without write writetext work x509 xmlelement xmlexists xmlnamespaces xor year years year_month zerofill 38 39 Extension related field settings Context Entity field Entity field Entity field Entity field Entity field Entity field Entity field Entity field Entity field T e
91. ontainer with inheri tance relationships Check Self relations are not allowed for inheritance relationships The discriminatorColumn at tribute must not be empty for inheritance relations Please rename the discrim inatorColumn field as it is reserved for the discrimina tor column or change corre sponding attribute Inheritance cycles are not al lowed 49 Remarks Per default this attribute has the value discr so this shouldn t happen as long as you don t delete this value ModuleStudio uses this value to tell Doctrine 2 where to store the type of stored enti ties Happens if the target entity includes a field with the same name as specified in the dis criminator setting Recursive check to detect cy cles within inheritance hierar chies 5 4 5 Entity index Context Entity index Entity index Entity index Entity index Entity index Entity index Entity index item Entity index item Check Index must be assigned to an entity Every index must have a name Every index must contain at least one item referencing an entity field The length of all index fields must not be higher than 333 Index names must be unique per entity Index item names must be unique per index The index item must be as signed to an index Every index item must have the same name as the refer enced entity field 50 Remarks Should not occur in practice this is just for comp
92. oolean specifying whether the field for this relationship is unique or not The default value is false The generator transforms most of these settings to the corresponding implementation as is The only thing which is used outside of the entity classes is the edit type 86 5 2 which controls how relationships are handled in edit actions 6 5 3 Join relationships are automatically incorporated into the dql queries which are placed in the entity repository classes You can override these methods for changing selection details if required One to one relationship Represents one to one relationships It includes the following properties in addition to the common ljoin relationship 86 5 2 settings e orphanRemoval Default value is false If set to true orphans get removed auto matically e primaryKey A boolean specifying whether the foreign key of this relation should act as a primary key The default value is false Please note that this has not been tested yet and probably won t be supported properly yet by the controller layers in the generated application One to many relationship Represents one to many relationships It includes the following properties in addition to the common join relationship 86 5 2 settings e indexBy Set to target field name must be unique to specify the index by criteria for the relation Please note that this has not be tested very well yet e orderBy Set to target field name t
93. operties in addition to the common relationship 86 5 2 settings e discriminatorColumn Name of the field used for storing the entity type e strategy The inheritance strategy used for data storage The generator considers inheritance for all classes which are created for each entity This includes naturally the entity classes itself but also additional classes like reposito ries validators or additional entities for extensions like attributes categories log entries translations and more As explained in the all generated concrete classes inherit from corresponding abstract base classes As soon as an entity does inherit from another one there will be no base class created for it Instead the concrete implementation class will inherit from the concrete class of the parent entity Example for Zikula 1 4 0 namespace MyModule Entity Validator Base class Person extends MyModule Validator generator code namespace MyModule Entity Validator class Person extends Base Person manual code namespace MyModule Entity Validator class Customer extends Person manual code 92 Example for Zikula 1 3 7 and below class MyModule Entity Validator_Base Person extends MyModule_ Validator generator code class MyModule Entity Validator_ Person extends MyModule_ Entity Validator_Base_ Person manual code class MyModule_ Entity Validator Customer extends MyModule Entity Validator Person manual code Wh
94. ppears if you have more than 14 entities Remember Zikula is a mod ular system You can de sign whole families of exten sions with ModuleStudio so please try keeping complexity low and apply separation of concerns This case is reserved as it could make sense to use corresponding namespaces in generation for encapsulating some common code parts Occurs if a model s con trollers contain a view ac tion but no according vari ables are found in the any model layer 29 5 4 2 Entity General entity settings Context Entity Entity Entity Entity Entity with fields Entity with fields Entity with composite pri mary keys Entity with fields Entity with fields Entity with fields Entity with fields Entity with fields Check The entity must be assigned to a model container Every entity must have a name name for multiple in stances Entity multiple name must not contain underscores Every table must contain at least one field or inherit fields from a parent table You may not mark a field as primary this is done auto matically unless maybe you want to create composite pri mary keys Remove ID fields you do not need them unless maybe you want to create composite primary keys Composite entities can only have identifier strategy NONE Please remove the leading field flags as this property is going to be removed in fu ture Using display pattern
95. r component Default value is true 64 e generateTagSupport A boolean specifying whether tag support should be gener ated or not Requires user or admin controller containing a display action Default value is true e generateRss Templates A boolean specifying whether rss view templates should be generated or not Default value is true e generateAtomTemplates A boolean specifying whether atom view templates should be generated or not Default value is true e generateCsvTemplates A boolean specifying whether csv view templates should be generated or not Default value is true e generateXmlTemplates A boolean specifying whether xml display and view tem plates should be generated or not Default value is true e generateJsonTemplates A boolean specifying whether json templates should be generated or not Default value is true e generateKmlTemplates A boolean specifying whether kml templates should be generated or not Requires geographical flag on corresponding entities Default value is true e generateOnlyBaseClasses A boolean specifying whether only base classes should be generated May be useful for doing simple upgrades without structural changes Default value is false e skipFiles Comma separated blacklist with each entry representing a file which should not be generated Default value is an empty string e timestampAllGeneratedFiles A boolean specifying whether the generated by mes sage should cont
96. r is not flexible yet this is caused by limitations in the current editors Most screenshots in this section are taken from the example application called Recipe Manager 60 h Please select desired reports Ey Os Please select which reports you would like to generate modelinFos Y dokumentation Y FunctionPoints Select All Deselect All OK Cancel Figure 6 2 Report selection 6 5 1 Application layer Language elements Named object This is the common base class of almost all model elements It includes the following properties e name The name of the element e documentation A description for documenting the element If a documentation is defined for an entity this will be shown right after the heading of the corresponding view template So you could for example add a description for the person entity explaining what persons are and what information they store If a user does then what the persons list he knows immediately what he is looking at Application Represents an application described by the model It includes the following basic properties e vendor The vendor of the application Usually this is the name of a company or institution Becomes important in a future version as the vendor and name of an application are going to be combined to a unique name Then it is possible to have for example multiple News modules installed from different vendors 61 e author The author of the app
97. r strategy 86 5 2 is applied The default value is NONE leading A boolean specifying whether this is the primary and default entity or not lockType Whether and which locking strategy 86 5 2 is applied loggable A boolean specifying whether the loggable behavior is used or not The generator will create an additional entity for managing the log entries if set to true There is no user interface for the version management yet see 30 for more information mappedSuperClass A boolean specifying this is a mapped superclass or a normal entity A mapped super class is not able to store data At the moment the generator creates many unrequired things for mapped super classes though like for example view templates The only thing where mapped super classes are already rejected correctly are repository classes metaData A boolean specifying whether this entity should have support for meta data If set to true the generator creates additional inclusion templates for dis playing and changing corresponding fields nameMultiple Plural form of the name The generator uses this for collections list views and other areas where multiple entities are used 69 e ownerPermission Whether users should be able to manage and edit their own data Defines also whether the workflow should include a deferred state See workflow types 86 5 2 for more information The default value is false e readOnly A boolean specifying whethe
98. r this entity is read only or not If set to true editing will not be possible e slugLength Length of slug field Defaults to 255 An entity is sluggable as soon as at least one of its fields set sluggable position to a value greater than 0 e slugSeparator Separator which will separate words in slug Default value is like in Zikula too e slugStyle Which slug style 86 5 2 is used e slugUnique A boolean specifying if the slug is unique or not Default value is true e slugUpdatable A boolean specifying if the slug can be changed or not Default value is true e softDeleteable Whether deleted items should only be marked as deleted instead of deleting them Defines also whether the entity workflow provides means for trashing and recovering items or for deleting them See workflow types 6 5 2 for more information The default value is false e tree Whether and which tree strategy is applied More information about what the generator creates for trees can be found in the the section about entity tree types 86 5 2 e standardFields A boolean specifying whether the standard fields extension is used or not If set to true the entity will get four additional fields for storing the id of the user who created the item the id of the user who did the last update as well as the creation and update dates This information will be included on display 86 5 3 and edit 6 5 3 actions e workflow The workflo
99. read only or not Must be revalidated later to see if this is really required e isMandatory Whether this input is mandatory or not might be different as specified in the data layer e isVisible Whether this input is visible or not Design field Shows some additional information which is not data driven It includes the following properties in addition to the common field 6 5 4 settings e tagName Defines which markup tag should be used for example p or h4 Form label Design field 86 5 4 extension for form labels It includes the following properties in addition to the design field 6 5 4 settings e for Allows referencing an input field 6 5 4 Button Abstract representation for buttons A button may have the following references e label String for the label text Link Abstract representation for hyperlinks Activator An activator is something which submits a form or start another way of interaction 103 Submit button Inherits from both submit activator 6 5 4 and button 86 5 4 A submit button may have the following references e searchContext Allows referencing alsearch panel 86 5 4 The submit button type defines which kind of cancel button should be used e OK e YES e CONTINUE e NEXT Cancel button Inherits from both cancel activator 36 5 4 and button 86 5 4 The cancel button type defines which kind of cancel button should be used e CANCE
100. reat date values as date input elements with the includeTime attribute set to false in edit 6 5 3 pages For the output in view 86 5 3 and play 6 5 3 templates the datetime modifier is used to format the date according to the current locale Time field Represents a field type for storing time values with the format H i s A time field has no fields or references in addition to the common abstract date field 86 5 2 settings The generator will treat time values as text input elements with a maximum length in edit 6 5 3 pages as long as there is no time field plugin implemented For the output in view 6 5 3 and display 6 5 3 templates the datetime modifier is used to format the time according to the current locale Entity identifier strategy Represents different strategies for identifier generation Can be one of the following options e NONE No explicite strategy e AUTO Choose automatically SEQUENCE Uses a database sequence e TABLE Uses a single row database table and a hi lo algorithm IDENTITY Obtains IDs from special identity columns auto_increment UUID Generates universally unique identifiers CUSTOM Custom strategy 81 The generator transforms these values to the corresponding implementation as is There are no differences made between the different index types So beside the actual entity class there won t be any code parts affected based on which ide
101. rn is defined and also no field is marked as leading This warning occurs when no display pattern is defined but a field is marked as leading This warning occurs if a dis nlav pattern does not contain Inheritance related entity settings Context Entity with inheritance re lationships Entity with inheritance re lationships Entity Entity Entity Entity defined as mapped su per class Entity defined as mapped su per class Entity defined as mapped su per class Entity Entity Check All entities within a class hi erarchy must have the same change tracking policy All entities within a class hi erarchy must not have a field with the same name All inheritance connections within a class hierarchy must have the same inheritance strategy All inheritance connections within a class hierarchy must have the same discriminator column An entity can not inherit from multiple entities All associations outgoing from mapped super classes must be unidirectional One to many relations are not possible for mapped su per classes Many to many relations are only possible for mapped su per classes if it is used only in one entity at the same time The length of all entity fields must not be higher than 21845 Entities with owner permis sions need standard fields ac tivated 31 Remarks Requirement by Doctrine 2 The limit is 65535 bytes while UTF 8 requires three bytes for ea
102. rol system like git or svn gives you another additional level of rollback safety and is a good idea anyway 7 3 Additional notes Please see also this tutorial Some parts are a little outdated due to the migration from Doctrine 1 3 to Doctrine 2 but this shouldn t be a problem for the understandability of the overall messages shown there 108 8 Other cartridges 8 1 Introduction Beside an application it is possible to create other interesting artifacts from a given input model This section explains what the other generator cartridges of ModuleStudio are doing 8 2 Reporting The reporting cartridge aims on generating helpful documents for the project manage ment and application design The following sections summarise the existing reports which are not feature complete but act as a proof of concept for the integration of reporting technology 8 2 1 Documentation This document is a draft for a structural documentation of the model It shows all essential model elements together with their most important properties In case you added information to the generic documentation field of your model elements those descriptions will be shown here too 8 2 2 Model information General document used as a playground to experiment with things Beside some statistics it shows some diagrams illustrating some measures with regards to the entities in the data layer For example one can see which entities have the most relationship
103. rs the config page will use a tabbed panel containing a tab for each container sorted by the sortOrder field This allows separating settings in bigger models into logical semantic groups Variable Represents a module variable It includes the following properties e name Name of the variable e value Default value of the variable A variable may have the following references e container Reference to the owning element For each variable the generator creates an according input element in the config page Also the variable is handled properly in the installer classes which takes care for initial isation and removal on uninstallation If you enabled interactive installation there will also be an init page asking for the initial values for all variables However this is not matured very well yet Text var Represents a setting with alphanumeric values It includes the following properties in addition to the common variable 6 5 2 set tings e mazrLength The maximum length The generator creates an input for text for a text variable The maximum length is not considered anywhere in the generated code yet Int var Represents a setting with numeric integer values The generator creates an input element for integers digits for an integer variable 94 Bool var Represents a setting with boolean values The generator creates a checkbox input element for a boolean variable File path var Represents a s
104. ructures for the application This involves the following key concepts e Entities Entity fields Join and inheritance relationships e Behavioural and functional extensions e Variables 1 4 3 Controller layer Each controller layer defines a logical group of use cases for the application This involves the following key concepts e Controllers e Controller actions e Action handlers e Action events e Transitions 1 4 4 View layer Each view layer defines a logical group of view templates for the application This involves the following key concepts e Views e Root panels composite panels sub panels e Forms and tables e Activators e Layout orders At the moment there is no editor ready for customising the view layer The generator will create default template sets which can be customised with overriding mechanisms offered by Zikula 1 4 5 Workflow layer The workflow layer is not implemented yet This section is just a dummy for future 1 5 Additional notes None yet 2 Component overview 2 1 Introduction This page gives you an overview of the main parts of ModuleStudio and how they work together 2 2 Modeling Language The inner core of MOST is a domain specific language DSL for Zikula extensions This language allows a formalised description of applications which is a fundamental requirement to process models automatically with the help of transformations For convenience ModuleStudio uses
105. s 6 5 2 Calculated fields are not part of the model editor yet and will therefore be ignored by the generator Boolean field Represents a field type for storing boolean values A boolean field has the following properties in addition to the commonlentity field 86 5 2 settings e ajarTogglability Boolean indicating whether it is possible to switch this flag with ajax or not If set to true all view and display pages will contain corresponding links instead of only simple state images The generator will treat boolean values as checkbox input elements in edit 6 5 3 pages For the output in view 6 5 3 and display 86 5 3 templates the yesno modifier is used to show an image indicating the boolean value green check or red cross 73 Abstract integer field Represents an abstract integer field for grouping different implementations of this field type An abstract integer field has the following properties in addition to the common field 6 5 2 settings e length The length of this field This controls whether the Doctrine mapping type will be integer bigint or smallint Default value is 11 e sortablePosition A boolean specifying whether this field stores the position for the sortable extension or not If set to true this field will be used as default sorting criteria There is no built in reordering possibility for example with drag n drop implemented yet see 29 for more information Integer
106. s and thus complexity to be managed 8 2 3 Function points This report shows a calculation of unadjusted function points wikipedia These are a measurement for the amount of complexity in a software system It can be used as an input value for other methods like COCOMO II wikipedia 8 3 Additional notes None yet 109 9 AddOns 9 1 Introduction This chapter is about extending ModuleStudio There will be different types of extensions for ModuleStudio but this page is primarily intended for future versions 9 1 1 Language packs At the moment only German locales are shipped with ModuleStudio These involve all own translation strings but not those from the Eclipse platform and used frameworks yet It is planned to make language packs available as optional feature bundles at a later stage 9 1 2 Figure galleries Not implemented yet though as the modeling language itself must become matured first 9 1 3 Template sets Not implemented yet though as the modeling language itself must become matured first 9 1 4 Generator cartridges Not implemented yet though as the modeling language itself must become matured first 9 1 5 Other extensions As the roadmap is quite open in the long term many aspects are not decided yet There fore things may change significantly 9 2 Extension Points None yet 9 3 Additional notes None yet 110 Part III Appendix 111 10 Troubleshooting 10 1 Introduct
107. s as well as for the output in few 6 5 3 and display 96 5 3 templates 79 Abstract date field Represents an abstract date dependant field for grouping those field types An abstract date field has the following properties in addition to the common field 6 5 2 settings e future A boolean specifying whether the value must be in the future or not past A boolean specifying whether the value must be in the past or not e timestampable Which timestampable type 86 5 2 is used e timestampableChangeTriggerField Optional name of field to use as change trig ger if type is CHANGE Can also be workflowState or the name of a relation property field e timestampableChange Trigger Value Optional value of field to use as change trigger if type is CHANGE The past and future properties are implemented as client side and server side valida tors The generator transforms the timestampable attributes to the corresponding imple mentation as is There are no differences made between the different timestampable types Datetime field Represents a field type for storing datetime values with the format YYYY MM DD H i s A datetime field has the following properties in addition to the common abstract date field 86 5 2 settings e startDate A boolean specifying whether this field should be treated as a start date If set to true this field is included into determining public visibility of the corresponding objec
108. s in the controller layer A controller container may have the following references e application Reference to the owning element e controllers Allows referencing one or more controllers 86 5 3 e handlers Allows referencing one or more action handlers 86 5 3 e modelContext Allows referencing one or more model containers 6 5 1 e process Views Allows referencing a e transitions Allows referencing one or more transitions 6 5 3 As all the container elements also the controller container is primarily a composite element containing a sublayer The generator creates according controller classes but does not separate different controller containers on code level View container Container class for carrying elements in the view layer A view container may have the following references e application Reference to the owning element e controller Allows referencing a controller container 86 5 1 e layoutOrders Allows referencing one or more layout orders 86 5 4 e views Allows referencing one or more views 6 5 4 As there is no view editor available yet this element is not relevant for the generator yet Instead it only creates default templates for each existing controller action 86 5 3 and entity 86 5 2 as well as some common templates which are included or required for some extensions Combinations and edge cases Multiple containers may not be considered properly in all implementatio
109. s require the usage of datetime fields for that You can either set a certain value or use now to specify the current timestamp You can either set a certain value or use now to specify today You can either set a certain value or use now to specify the current moment Other fields Upload field Upload field List field List field List field 5 4 4 Relationship Context Relationship Relationship Join relationship The allowedExtensions attribute must contain a comma separated list of the file types to be allowed during the upload example gif jpeg jpg png Note that the separator is including the space char There must not exist a field named fooMeta because this is reserved for an automatic field storing meta data for this upload The list must contain at least one item The list is not set to multi ple and may therefore only contain one item with default property set to true Only lists with multiple se lections can consist of check boxes Check Relation must be assigned to a model container Every relation must have a source target entity Occurs if you set useChecks to true but not multiple Checkbox lists with only one selection allowed are post poned to a future version Remarks Should not occur in practice this is just for completeness Should not occur in practice this is just for completeness Includes basically all relationships in the da
110. se categoryld int4 true false stylePosition string20 true fals views int4 true false styleWidth string20 true false active intl true false styleClass string100 true false activeFrom datetime true fals Pp activeTo datetime true fals inMenu intl true false int4 true false position int4 true false con_pageic pageld int4 true false level int4 true ike data text2 000 true false etLeft int4 RE fal revisionNo int4 true false i care ar a action string255 true false language string10 true false date datetime true fals ipno string30 true false B E BE i categoryld BEE language string10 true false userld int4 true false data text2 000 true false nslate age als geld int4 true false language string10 true false title string255 true false metadescription text2 000 true fals metakeywords text2 000 true false Figure 3 3 Content module 15 4 User interface 4 1 Introduction This section shows how to use ModuleStudio Starting with a general demonstration of the user interface it goes step by step through all single editors required for creating a complete model At the moment this page consists only of a few links to corresponding tutorials It will be enhanced at a later stage after the actual modeling language has matured enough to spend work on c
111. se an option including the PageLock module the form handlers generated for the edit 6 5 3 pages will call some api functions of the PageLock extension in order to incorporate these features 82 Entity tree type Represents different tree strategies for entities Can be one of the following options e NONE No tree e NESTED Nested set e CLOSURE Closure If an entity has a tree type other than NONE then the generator creates several additional artifacts like for example e An additional template for managing the tree in a hierarchy view e An additional view plugin for including the Zikula tree javascript An additional template included in display pages for showing different types of relatives e Some ajax functions used by the hierarchy view e For closure separate classes for the closure entities Entity slug style Represents different slug styles for the creation of permalinks Can be one of the following options e LOWERCASE Lowercase e UPPERCASE Uppercase e CAMEL Camelcase The generator transforms these values to the corresponding implementation as is There are no differences made between the different slug styles So beside the actual entity class there won t be any code parts affected based on which slug style you use Entity timestampable type Represents different events for triggering the Timestampable extension Can be one of the following options e NONE No Timestampable exte
112. served iden tifier _controller method _locale Field name is a reserved iden tifier workflowState Field name is a reserved database keyword Mandatory fields may not be nullable too The default value is too long for the specified field length The minimum value is too long for the specified field length The maximum value is too long for the specified field length Fields using text or blob data types must not be unique ap plies for text array and ob ject fields 35 Remarks Should not occur in practice this is just for completeness Field name must have a length of at least two chars Should have more than three chars These are reserved vars in traditional Zikula extensions These are reserved vars in the Symfony framework This list field is added au tomatically by a model to model transformation before the actual generation hap pens ModuleStudio prevents the usage of keywords which are reserved in some database systems Background is that there are no column prefixes anymore For a list of all key words see tion 5 4 3 Occurs if you try to activate both mandatory and nullable properties for a field Reserved database keywords The following list has been merged and includes therefore all keywords of all supported DBMS abort access action activate add after alias all allocate allow alter anal yse analyze and any arraylen as asc asensitive assoc
113. t exception excluding exclusive exec execute exists exit explain external extract fail false fenced fetch fieldproc file final fillfactor float float4 float8 floppy for force foreign free freetext freetexttable freeze from full fulltext function general generated get glob global go goto grant graphic group having handler hash hashed_value having high_priority hint hold holdlock hour hours hour_microsecond hour_minute hour_second identified identity identitycol identity_insert if ignore ilike immediate in in cluding inclusive increment index indexed indicator inf infile infinity inherit initial initially inner inout insensitive insert instead int intl int2 int3 int4 int8 integer integrity intersect interval into is isnull isobid isolation iterate jar java join keep key keys kill 36 label language lateral lc_ctype leading leave left level like limit lineno lines linktype load local localdate locale localtime localtimestamp locator locators lock lockmax locksize long longblob longtext loop low_priority maintained match materialized max maxextents maxvalue mediumblob medi umint mediumtext microsecond microseconds middleint min minus minute minutes minute_microsecond minute_second minvalue mirrorexit mod mode modifies modify month months nan national natural new new_table nextval no
114. ta layer except inheritance 45 Context Join relationship Join relationship Join relationship Join relationship Join relationship Join relationship Join relationship Join relationship Join relationship Check Every join relation must have a source target alias Relationship source aliases must be unique for all incom ing relations of an entity Relationship target aliases must be unique for all outgo ing relations of an entity The sourceField target Field attribute must contain either id for automatic pri mary key or a comma sepa rated list of source target fields to be referenced Note that the separator is in cluding the space char The amount of join columns must be equal for association source and target sides The field sourceField target Field must be an integer field with a length of 11 The fields sourceField and targetField must have the same type and length values Self relation must not refer ence the sourceField field for both source and target Between two entities there must not be multiple join re lations with cascade options 46 Remarks Aliases must have a length of at least two chars Rec ommended are at least four chars If source or target field are not id ModuleStudio splits both values by the separa tor above and compares the amount of elements on both sides This enables joins over multiple fields Is only che
115. tely ignored by the generator You should never theless keep it set to WEB to be on the safe side for future Core version Zikula version for which the application should be generated Can be one of the following options e ZKPRE14 Aims on Zikula 1 4 0 and later This is the default value and useful when developing for future e ZK136 For Zikula 1 3 7 and earlier This is for backwards compatibility and useful when maintaining extensions in production e ZK135 For Zikula 1 3 7 and earlier This is for backwards compatibility and useful when maintaining extensions in production 63 Settings container Each application may contain one settings container for customising generator settings You can control which features should be generated and take influence on some be havioural aspects of the generator A settings container has the following fields e targetCore Version The targeted Zikula core version Seelabove 86 5 1 e generateAccountApi A boolean specifying whether account panel integration should be generated or not Default value is true e generateSearchApi A boolean specifying whether search integration should be generated or not Requires at least one string or text field in any entity Default value is true e generateMailzApi A boolean specifying whether Mailz support should be gener ated or not Default value is true e generateListBlock A boolean specifying whether a generic list block should b
116. tensions in a few steps and meet individual project requirements with them ModuleStudio rapidly simplifies the creation maintenance and customisation of ap plications for Zikula It speeds up this process and ensures quality of those applications at the same time Applications can be designed or customised in a graphical editor and then the code is generated In this way the process is automated speeding up develop ment time and quality many hundred fold Maintenance and customisation also benefit from this process via graphical modeling and code generation Read more at this page What is ModuleStudio 1 2 Benefits e Development time costs avoid wasting weeks for schematical and architecturally motivated code parts e Maintainability your software is a model easily changeable and cheaply main tainable No more efforts for getting your modules up to date for new versions just regenerate and merge the code e Code quality take profit from best practices and established patterns Architectural compliance take most usage from powerful core frameworks and interfaces Generated applications follow all APIs and guidelines automatically This is a big step for avoiding unsecure and legacy extensions when the framework itself evolves Reusability share and modify your models Do not make the same work twice e Understandibility avoid having to learn programming rules and framework details Develop with general MVC Model View Contr
117. tionship Check The edit type AC Remarks TIVE_CHOOSE_PASSIVE_NONE is only valid for many to many relationships The edit type AC TIVE_EDIT_PASSIVE_NONH is only valid for many to many relationships The indexBy attribute points to an invalid field of the tar get entity IndexBy fields must be unique Check The indexBy attribute points to an invalid field of the tar get entity IndexBy fields must be unique relation refClass A many to many must have the attribute defined The refClass attribute must be unique for all relations The refClass attribute must not be equal to any entity name 48 Checks whether the target entity contains a field equally named like the indexBy prop erty The target entity field used for indexBy must have unique validator enabled Remarks Checks whether the target entity contains a field equally named like the indexBy prop erty The target entity field used for indexBy must have unique validator enabled The reference class defines the name of the entity man aging the many to many rela tionship If for example many persons have many addresses you could choose personAd dress as reference class The generator creates addi tional entity classes so unique naming is ensured to prevent naming collisions Inheritance relationship Context Inheritance relationship Inheritance relationship Inheritance relationship Model c
118. treated as currency If set to true the generator will use the formatcurrency modifier instead of format number during output e length The length of this field Default value is 10 e maz Value Maximal value If set to a value other than O then a validator will enforce this constraint on client and server side e minValue Minimal value If set to a value other than O then a validator will enforce this constraint on client and server side e scale The amount of digits after the dot Default value is 2 In edit 6 5 3 pages the generator will use float input elements as well as validation on client and server side For the output in view 6 5 3 and display 6 5 3 templates the value will just be shown using the formatnumber modifier Float field Represents a field type for storing float numbers A float field has the following properties in addition to the common entity field 86 5 2 settings e aggregationField A boolean specifying whether this field should act as an aggre gate field If set to true the generator creates special methods for aggregation e currency A boolean specifying whether this field should be treated as currency If set to true the generator will use the formatcurrency modifier instead of format number during output e length The length of this field Default value is 10 e mazValue Maximal value If set to a value other than O then a validator will enforce this constraint on c
119. ts e endDate A boolean specifying whether this field should be treated as an end date If set to true this field is included into determining public visibility of the corresponding objects e version A boolean specifying whether this field should act as a version If set to true the owning entity will need to use loptimistic locking 86 5 2 Please read more at the integer field 6 5 2 section Also please note that it is preferred to use integer fields instead of datetime fields for version storage read more in the validation chapter 85 4 3 The generator will treat datetime values as date input elements with the includeTime attribute set to true in edit 6 5 3 pages For the output in view 86 5 3 and play 86 5 3 templates the datetime modifier is used to format the datetime according to the current locale 80 Date field Represents a field type for storing date values with the format YYYY MM DD A date field has the following properties in addition to the common Jabstract date field 6 5 2 settings e startDate A boolean specifying whether this field should be treated as a start date If set to true this field is included into determining public visibility of the corresponding objects e endDate A boolean specifying whether this field should be treated as an end date If set to true this field is included into determining public visibility of the corresponding objects The generator will t
120. ty field 86 5 2 settings e defaultValue The default value of the field This default value is used when creating new entities with the edit action 6 5 3 e leading A boolean specifying whether this is the primary and default field in this entity Default value is false This setting is obsolete Use the displayPattern property of the containing entity 6 5 2 instead e mandatory A boolean specifying whether this field is mandatory or not The default value is true e nullable A boolean specifying whether the field may be null or not The default value is false A nullable field may not be mandatory at the same time e primaryKey A boolean specifying whether this is a primary key field or not De fault value is false Usually there is no need to enable this for any fields as the generator adds primary and foreign key fields automatically The only use case where the manual definition of primary keys makes sense is having composite keys This should work in general with regards to the generated data layer but sup port on controller and view layers in the created application may not be prepared properly yet for that 72 e readonly A boolean specifying whether this a read only field or not The default value is false If set to true then this field may not be changed during editing e sluggablePosition Position of this field in the created slugs A value of 0 means that this field is not part of the slug at al
121. ty for now 6 5 5 Workflow layer The workflow layer is not very configurable yet At the moment there are three predefined workflows available which can be defined in the model for each entity 86 5 2 For more information see entity workflow types 6 5 2 In future it is planned to create a dedicated layer for modeling only possible workflow states and actions 6 6 Additional notes None yet 106 7 Customisation and maintenance 7 1 Introduction This section gives a few hints for changing arbitrary things in your generated applications while keeping in sync with upcoming releases of Zikula and ModuleStudio 7 2 Long term maintenance To prevent losing the benefits of ModuleStudio 81 2 in future you have to follow a few simple basic rules in your development process 7 2 1 Keep consistent When using ModuleStudio then your model is not only some sort of bootstrapping or documentation artifact The model describes or better is the real application Therefore you should do all important changes like adding or moving table columns renaming an entity or other amendments introducing a new controller action etc on model level although it might look a bit inconvenient first Do not let your model become obsolete as this would mean losing lots of advantages You will thank yourself when generating again with a newer version 7 2 2 Document your changes Document your changes to simplify the merging process you wi
122. vent types are available e Start initial event e Normal event e End final event An event may have the following references e handler Reference to the owning element Not used yet by the generator at all 99 Transition Transitions define how the user may move between the available use cases defined by the controller actions 6 5 3 The following transition types are available e Redirect automatic e User transition manual It includes the following properties e condition A conditional expression which must be or become true to activate the transition A transition may have the following references e container Reference to the owning element e source Reference to source action e sourceEvent Reference to the source action s event causing this transition e target Reference to target action Not used yet by the generator at all Combinations and edge cases At the moment the controller editor is almost limited to the creation of controller and action elements As stated above action handlers and action events are not really used yet Therefore there the variation in this layer is not that huge yet so there are no special aspects to explain here 6 5 4 View layer As there is no view editor available yet all the following elements are not relevant for the generator yet Instead it only creates default templates foreach existing action 6 5 3 and entity 86 5 2 as well as some c
123. w which is applied to this entity See workflow types 86 5 2 for more information The default value is NONE Normally all created classes are generated twice Thereby an empty concrete class inherits from an abstract base class containing the whole generator code The motivation behind this separation is that your own code keeps free from generated artifacts Example for Zikula 1 4 0 namespace MyModule Entity Validator Base class Person extends MyModule Validator generator code namespace MyModulel Entity Validator 70 use MyModulel Entity Validator Base Person as BasePerson class Person extends BasePerson manual code Example for Zikula 1 3 7 and below class MyModule Entity Validator_Base Person extends MyModule Validator generator code class MyModule_Entity_ Validator __ Person extends MyModule_Entity_ Validator_Base_ Person manual code One exception for this scheme is inheritance 86 5 2 Please note that arbitrary filtering is not possible at the moment until FilterUtil has been upgraded to support Doctrine 2 Whenever you want to change the default implementation you can add corresponding extensions If you recognise that you are doing the same changes again and again please submit them as patches for the generator An entity may have the following references e container Reference to the owning element e fields Allows referencing one or more entity fields 86 5 2
Download Pdf Manuals
Related Search
Related Contents
Untitled 取扱説明書 Peavey PV 2000 Stereo Amplifier User Manual SERVICE MANUAL - Bradford White Instructivo Anafe Vitroceramico TST NS 18 - Aci Csai Copyright © All rights reserved.
Failed to retrieve file