Jump to content

Media Archive LVOOP


Recommended Posts

Hello,

I want to make my first OOP-Project(for me, private, not for sell, only to get any experiance in LVOOP). The program must handle a table file with some general informations about media files(films, songs, photos a.s.o). By clicking on a row in the table - more file special informations should appear. Items should can be sorted by any column in the table and a search function should be implemented. Don't think it's my homework! I have this project just completely ready to run and it works(but is not OOP-based).

My plan is following:

create a class that have general properties like item-number(ID), name of item, name of file, kind, date, source, place on HD, place in the room, size, number of CDs or DVDs and general methods like set/get general properties.

Than I want to inherit this class to more specifical classes, e.g.

for films I add more properties: regisseur, headliners. Specifical methods: set/get spec. props for films

for songs: props - songer, album. Methods: set/get props for songs

and so an.

It's right way to make that? Where should I begin with LVOOP?

Thanks, Eugen

Link to comment

Hi,

You can start to write a class with variable is the path to the file, and with methods such as: add one item, read one item, verify item, delete one item, ...(Those method use basic VI working with configuration file). In those methods you will use the variable path and the parameter is the information of the item.

Then after that, you can add more features, more specific to these methods thourgh inheritance.

Link to comment

QUOTE(Thang Nguyen @ May 8 2007, 12:10 AM)

Hi,

You can start to write a class with variable is the path to the file, and with methods such as: add one item, read one item, verify item, delete one item, ...(Those method use basic VI working with configuration file). In those methods you will use the variable path and the parameter is the information of the item.

Then after that, you can add more features, more specific to these methods thourgh inheritance.

Thanks Thang Nquyen, I will do it.

But why I have to begin with FILE PATH as my first class? I can consider my file as an object, but I thought my objects shoulb be my items, not the DB-file. I would create my General-Item-Class and add the file path as property. It's not right?

Eugen

P.S. yes, it's right, either way, earlier or later the file path will be one of properties in my general class.

Other question: how can I create an object from two classes?

I think, if the user clicks on the "add new item" and then select the type, I will create a new object of type "special class", which is inherited from my generall class and have additional item-type-special props and methods.

Eugen

Link to comment

QUOTE(Thang Nguyen @ May 8 2007, 04:15 PM)

Hi,

You can take a look at the "Create by Ref" from the GOOP Developer of Sciware. It allows you create specific object from the generic object. I don't have much experience with other GOOP.

Why I should use another GOOP Tools? Its not possible with LVOOP (LV8.2) ?

Eugen

Link to comment

QUOTE(Aristos Queue @ May 9 2007, 03:56 PM)

I would prefer LVOOP for GOOP, because I automatically get updates and upgrades, because it's implemented in LV and supported by NI. Endevo's GOOP should cost extra money and NI's LV I just have. LVOOP has indeed any disadvantages to GOOP, but I hope in future versions of LV new OOP features will be implemented. And I think it's easier to understand LVOOP as GOOP.

Why I should use GOOP instead of LVOOP for this issue(project described in this topic)?

Eugen

Link to comment

QUOTE(Eugen Graf @ May 10 2007, 01:17 AM)

I would prefer LVOOP for GOOP, because I automatically get updates and upgrades, because it's implemented in LV and supported by NI. Endevo's GOOP should cost extra money and NI's LV I just have. LVOOP has indeed any disadvantages to GOOP, but I hope in future versions of LV new OOP features will be implemented. And I think it's easier to understand LVOOP as GOOP.

I don't have time to answer all your questions right now, but here's a few comments:

  • Yes, Endevo's GOOP costs extra $, but if you need the extra functionality it's worth it
  • There are several other GOOP implementations out there that are free or very cheap, including (but not limited to) dqGOOP and OpenGOOP
  • As for understanding LVOOP Vs GOOP, I don't agree: I think it's what you're first introduced to. For example: do you use the config file VIs on the palette? If so, then you're using GOOP. LV-OOP certainly is an excellent step in the world of LabVIEW, but for those of us who learned by-reference first, it's tricky to change our habits, as it's a different underlying paradigm.

Sorry for my briefness...

Link to comment

QUOTE(crelf @ May 9 2007, 05:41 PM)

I don't have time to answer all your questions right now, but here's a few comments:
  • Yes, Endevo's GOOP costs extra $, but if you need the extra functionality it's worth it
  • There are several other GOOP implementations out there that are free or very cheap, including (but not limited to) dqGOOP and OpenGOOP
  • As for understanding LVOOP Vs GOOP, I don't agree: I think it's what you're first introduced to. For example: do you use the config file VIs on the palette? If so, then you're using GOOP. LV-OOP certainly is an excellent step in the world of LabVIEW, but for those of us who learned by-reference first, it's tricky to change our habits, as it's a different underlying paradigm.

Sorry for my briefness...

Thank you,

arriving a class by reference or by value makes me no difficulties.

Eugen

Link to comment

QUOTE(Eugen Graf @ May 11 2007, 07:26 AM)

...allmost all classes I create are only wrappers for in LV existing objects...

:D that's not an uncommon thing when doing your first OO project. Remeber that one of the most important things about OO is encapsulation of both data and functionality: instead of just wrapping functions, you can put several of them in a method and/or make access to raw data private allowing only formatted data to be public for example.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.