Hi,
I propose to change this:
MoosModel>>sourceLanguage: aSymbol ^sourceLanguage := aSymbol
by:
MoosModel>>sourceLanguage: aSourceLanguage sourceLanguage := aSourceLanguage. sourceLanguage mooseModel: self
So, that we don't have to remember to add manually the source language to the model.
Is it ok to do this change?
usman
Sounds good. But, if we add it to the MooseModel, then we will not need the instance variable, because it will be added in the pool of entities.
Doru
On Mon, Sep 14, 2015 at 11:49 AM, Usman Bhatti usman.bhatti@gmail.com wrote:
Hi,
I propose to change this:
MoosModel>>sourceLanguage: aSymbol ^sourceLanguage := aSymbol
by:
MoosModel>>sourceLanguage: aSourceLanguage sourceLanguage := aSourceLanguage. sourceLanguage mooseModel: self
So, that we don't have to remember to add manually the source language to the model.
Is it ok to do this change?
usman
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On Mon, Sep 14, 2015 at 12:55 PM, Tudor Girba tudor@tudorgirba.com wrote:
Sounds good. But, if we add it to the MooseModel, then we will not need the instance variable, because it will be added in the pool of entities.
Agreed. That information is redundant and we can remove Instance variable. So, the getter becomes
MooseModel>>sourceLanguage <MSEProperty: #sourceLanguage type: #FAMIXSourceLanguage> <MSEComment: 'Source of the Language to which the model corresponds'> ^ self propertyNamed: name ifAbsentPut: [ self allSourceLanguages detect: [ :each | each isAttached not ] ifNone: [ FAMIXUnknownSourceLanguage new ] ]
I'll do this change.
Doru
On Mon, Sep 14, 2015 at 11:49 AM, Usman Bhatti usman.bhatti@gmail.com wrote:
Hi,
I propose to change this:
MoosModel>>sourceLanguage: aSymbol ^sourceLanguage := aSymbol
by:
MoosModel>>sourceLanguage: aSourceLanguage sourceLanguage := aSourceLanguage. sourceLanguage mooseModel: self
So, that we don't have to remember to add manually the source language to the model.
Is it ok to do this change?
usman
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Every thing has its own flow"
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On 14-09-15 13:28, Usman Bhatti wrote:
Agreed. That information is redundant and we can remove Instance variable. So, the getter becomes MooseModel>>sourceLanguage <MSEProperty: #sourceLanguage type: #FAMIXSourceLanguage> <MSEComment: 'Source of the Language to which the model corresponds'> ^ self propertyNamed: name ifAbsentPut: [ self allSourceLanguages detect: [ :each | each isAttached not ] ifNone: [ FAMIXUnknownSourceLanguage new ] ] I'll do this change.
In models with multiple languages, using the first found (detect:) can be wrong. If one would load a java model, one might start from a maven description.
Stephan
On 14-09-15 11:49, Usman Bhatti wrote:
Hi,
I propose to change this:
MoosModel>>sourceLanguage: aSymbol ^sourceLanguage := aSymbol
by:
MoosModel>>sourceLanguage: aSourceLanguage sourceLanguage := aSourceLanguage. sourceLanguage mooseModel: self
So, that we don't have to remember to add manually the source language to the model.
What is the MooseModel sourceLanguage? A model can have multiple languages.
Stephan
On Mon, Sep 14, 2015 at 1:31 PM, stephan stephan@stack.nl wrote:
On 14-09-15 11:49, Usman Bhatti wrote:
Hi,
I propose to change this:
MoosModel>>sourceLanguage: aSymbol ^sourceLanguage := aSymbol
by:
MoosModel>>sourceLanguage: aSourceLanguage sourceLanguage := aSourceLanguage. sourceLanguage mooseModel: self
So, that we don't have to remember to add manually the source language to the model.
What is the MooseModel sourceLanguage? A model can have multiple languages.
I think a model can have only one principal language. Then each FAMIXSourcedEntity have declared language other than the source language of their container model.
Stephan
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On 14-09-15 14:00, Usman Bhatti wrote:
On Mon, Sep 14, 2015 at 1:31 PM, stephan stephan@stack.nl wrote:
What is the MooseModel sourceLanguage? A model can have multiple languages.
I think a model can have only one principal language. Then each FAMIXSourcedEntity have declared language other than the source language of their container model.
That might be somewhat arbitrary. What about a php+sql+javascript+css+html application? What do we use this for?
Stephan
Multiple languages in the same model make sense if, say, you had F# and C# since the runtimes are the same, and will share similarities. Ideally, you'd be able to analyze relationships across the two languages. Same goes for JavaScript, CoffeeScript, TypeScript, JSX (et al.).
However, I'm confused by the idea of putting, say, SQL and PHP into the same model. Are there meaningful analyses that you can do with a heterogeneous model like that?
On Mon, Sep 14, 2015 at 8:22 AM, stephan stephan@stack.nl wrote:
On 14-09-15 14:00, Usman Bhatti wrote:
On Mon, Sep 14, 2015 at 1:31 PM, stephan stephan@stack.nl wrote:
What is the MooseModel sourceLanguage? A model can have multiple languages.
I think a model can have only one principal language. Then each FAMIXSourcedEntity have declared language other than the source language of their container model.
That might be somewhat arbitrary. What about a
php+sql+javascript+css+html application? What do we use this for?
Stephan _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On 14/09/15 16:09, Floyd May wrote:
However, I'm confused by the idea of putting, say, SQL and PHP into the same model. Are there meaningful analyses that you can do with a heterogeneous model like that?
For systems that use the database as integration layer I don't know about an alternative. I agree that we don't have many pre-build analyses for systems like that.
Stephan
There certainly are analyses to be done with systems like these. That is actually one of the powers of Moose that is allows you to build such heterogeneous models.
Doru
On Mon, Sep 14, 2015 at 11:56 PM, Stephan Eggermont stephan@stack.nl wrote:
On 14/09/15 16:09, Floyd May wrote:
However, I'm confused by the idea of putting, say, SQL and PHP into the same model. Are there meaningful analyses that you can do with a heterogeneous model like that?
For systems that use the database as integration layer I don't know about an alternative. I agree that we don't have many pre-build analyses for systems like that.
Stephan _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Every SourcedEntity knows its language. The MooseModel>>sourceLanguage is a fallback.
Doru
On Mon, Sep 14, 2015 at 3:22 PM, stephan stephan@stack.nl wrote:
On 14-09-15 14:00, Usman Bhatti wrote:
On Mon, Sep 14, 2015 at 1:31 PM, stephan stephan@stack.nl wrote:
What is the MooseModel sourceLanguage? A model can have multiple languages.
I think a model can have only one principal language. Then each FAMIXSourcedEntity have declared language other than the source language of their container model.
That might be somewhat arbitrary. What about a
php+sql+javascript+css+html application? What do we use this for?
Stephan _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Shouldn’t an entity be aware of the language it written in? Why the model?
Alexandre
On Sep 14, 2015, at 6:49 AM, Usman Bhatti usman.bhatti@gmail.com wrote:
Hi,
I propose to change this:
MoosModel>>sourceLanguage: aSymbol ^sourceLanguage := aSymbol
by:
MoosModel>>sourceLanguage: aSourceLanguage sourceLanguage := aSourceLanguage. sourceLanguage mooseModel: self
So, that we don't have to remember to add manually the source language to the model.
Is it ok to do this change?
usman
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On 14/09/2015 15:15, Alexandre Bergel wrote:
Shouldn’t an entity be aware of the language it written in? Why the model?
by default, the language of an entity is the language of the model. Thus for single language project, you don't need to specify the sourceLanguage for each and every entity.
For projects which multiple languages, one can either elect one language as the default one (and set individually the language of all other entities) or not set any default language (and set individually the language of all entities)
nicolas
Alexandre
On Sep 14, 2015, at 6:49 AM, Usman Bhatti usman.bhatti@gmail.com wrote:
Hi,
I propose to change this:
MoosModel>>sourceLanguage: aSymbol ^sourceLanguage := aSymbol
by:
MoosModel>>sourceLanguage: aSourceLanguage sourceLanguage := aSourceLanguage. sourceLanguage mooseModel: self
So, that we don't have to remember to add manually the source language to the model.
Is it ok to do this change?
usman
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On 15-09-15 10:42, Nicolas Anquetil wrote:
On 14/09/2015 15:15, Alexandre Bergel wrote:
Shouldn’t an entity be aware of the language it written in? Why the model?
by default, the language of an entity is the language of the model. Thus for single language project, you don't need to specify the sourceLanguage for each and every entity.
For projects which multiple languages, one can either elect one language as the default one (and set individually the language of all other entities) or not set any default language (and set individually the language of all entities)
Thank you, that makes sense. Then I propose to rename the instance variable to defaultLanguage with accessors (and add the explanation in a method comment)
Stephan
+1
2015-09-15 11:08 GMT+02:00 stephan stephan@stack.nl:
On 15-09-15 10:42, Nicolas Anquetil wrote:
On 14/09/2015 15:15, Alexandre Bergel wrote:
Shouldn’t an entity be aware of the language it written in? Why the model?
by default, the language of an entity is the language of the model. Thus for single language project, you don't need to specify the sourceLanguage for each and every entity.
For projects which multiple languages, one can either elect one language as the default one (and set individually the language of all other entities) or not set any default language (and set individually the language of all entities)
Thank you, that makes sense. Then I propose to rename the instance variable to defaultLanguage with accessors (and add the explanation in a method comment)
Stephan
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
+1 to rename the instance variable to defaultLanguage :)
2015-09-16 9:45 GMT+02:00 Fabrizio Perin fabrizio.perin@gmail.com:
+1
2015-09-15 11:08 GMT+02:00 stephan stephan@stack.nl:
On 15-09-15 10:42, Nicolas Anquetil wrote:
On 14/09/2015 15:15, Alexandre Bergel wrote:
Shouldn’t an entity be aware of the language it written in? Why the model?
by default, the language of an entity is the language of the model. Thus for single language project, you don't need to specify the sourceLanguage for each and every entity.
For projects which multiple languages, one can either elect one language as the default one (and set individually the language of all other entities) or not set any default language (and set individually the language of all entities)
Thank you, that makes sense. Then I propose to rename the instance variable to defaultLanguage with accessors (and add the explanation in a method comment)
Stephan
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
makes sense to me to
nicolas
On 16/09/2015 09:46, Fabrizio Perin wrote:
+1 to rename the instance variable to defaultLanguage :)
2015-09-16 9:45 GMT+02:00 Fabrizio Perin fabrizio.perin@gmail.com:
+1
2015-09-15 11:08 GMT+02:00 stephan stephan@stack.nl:
On 15-09-15 10:42, Nicolas Anquetil wrote:
On 14/09/2015 15:15, Alexandre Bergel wrote:
Shouldn’t an entity be aware of the language it written in? Why the model?
by default, the language of an entity is the language of the model. Thus for single language project, you don't need to specify the sourceLanguage for each and every entity.
For projects which multiple languages, one can either elect one language as the default one (and set individually the language of all other entities) or not set any default language (and set individually the language of all entities)
Thank you, that makes sense. Then I propose to rename the instance variable to defaultLanguage with accessors (and add the explanation in a method comment)
Stephan
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev