Book a Demo

Author Topic: property as Operation in EA?  (Read 13704 times)

Jack @ YTGI

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
property as Operation in EA?
« on: January 28, 2013, 05:47:08 am »
I'm redesigning an application I wrote a few years ago. I was working on a class diagram for one of the classes and decided to import the C# class I used in the old app as a head start. EA placed the private variable declarations in the Attributes compartment, but it imported the public properties into the Operations compartment? These are setters and getters, but I have typically saved the operations compartment for methods that have behavior. Just wondering what others thought . . .

Thanks,

Jack Yasgar
Yasgar Technology Group
[email protected]

PaulV

  • EA User
  • **
  • Posts: 27
  • Karma: +1/-1
    • View Profile
Re: property as Operation in EA?
« Reply #1 on: January 28, 2013, 09:22:33 am »
Quote
EA placed the private variable declarations in the Attributes compartment, but it imported the public properties into the Operations compartment?
The scope (private, protected, public etc.) make no difference: variables are equivalent to attributes and properties - to operations.

Quote
These are setters and getters, but I have typically saved the operations compartment for methods that have behavior. Just wondering what others thought . . .
Both getter and setter can have a behaviour, so a property is rather an operation than an attribute. Using of a property seems like using of an attribute, but it's syntax sugar only.


Doug Blake

  • EA User
  • **
  • Posts: 102
  • Karma: +0/-0
    • View Profile
Re: property as Operation in EA?
« Reply #2 on: January 28, 2013, 08:12:39 pm »
Quote
I'm redesigning an application I wrote a few years ago. I was working on a class diagram for one of the classes and decided to import the C# class I used in the old app as a head start.
Redesigning?? Looks more like modifying to me. IMO, redesign starts with a clean sheet of paper and some specifications, not the code you used last time!
DGB Using 12.0.1214 / eaDocX 3.6.2.1 / MSSQL / TFS / Windows 7 / IE11

Jack @ YTGI

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: property as Operation in EA?
« Reply #3 on: February 04, 2013, 01:54:36 pm »
Quote
Both getter and setter can have a behaviour, so a property is rather an operation than an attribute.

Thanks, your response prompted more research. I believe the setters and getters should not be shown at all, unless there is a specific reason to model it.

Thanks,

Jack Yasgar
Yasgar Technology Group
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: property as Operation in EA?
« Reply #4 on: February 05, 2013, 12:43:35 am »
Quote
Quote
I'm redesigning an application I wrote a few years ago. I was working on a class diagram for one of the classes and decided to import the C# class I used in the old app as a head start.
Redesigning?? Looks more like modifying to me. IMO, redesign starts with a clean sheet of paper and some specifications, not the code you used last time!
I guess the right term is "refactor"

q.

Jack @ YTGI

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: property as Operation in EA?
« Reply #5 on: February 07, 2013, 12:18:53 pm »
Quote
I guess the right term is "refactor"

q.

Sorry, I didn't feel the original post warranted a reply. The application is being scrapped and completely redesigned based on almost 80 users stories. The old app fulfills about 5 of the user stories. It was just a hack to fill a need at the time.

I was importing one class that is the object that holds an RSS listing as a short cut to typing in the 20 or so properties again. One class does not an application make, at least not in this case. Once I realized EA keeps the code from the class, I deleted it anyway and recreated it from scratch.

I'm using this project to exercise as many features of EA as possible, all the way from requirements management. I have only used EA for Use Cases, Activity Diagrams and ERDs up until now. After looking through some of the videos, I got motivated to use more of the features in the application.

Thanks for all the feedback. You guys a great!

Jack

Thanks,

Jack Yasgar
Yasgar Technology Group
[email protected]