HomeFairfax General ForumArrest/Ticket SearchWiki newPictures/VideosChatArticlesLinksAbout
Off-Topic :  Fairfax Underground fairfax underground logo
Welcome to Fairfax Underground, a project site designed to improve communication among residents of Fairfax County, VA. Feel free to post anything Northern Virginia residents would find interesting.
A Question for the OOP Hackers
Posted by: Confused ()
Date: June 15, 2009 01:32PM

Could someone provide an explanation of the term "instance" as it refers to software architecture in an open source environment? I've had it explained to me three times now and still don't understand. Thank you.

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: pgens ()
Date: June 15, 2009 01:45PM

I'm not sure why an instance would have a different meaning with the same language but using open-source tools, but...

An object is the existence, or instance, of a thing, defined by a class. Let us say a class describes an animal, like a cat. To define YOUR cat, you instantiate the object lolcat based on the class Cat and give it the values that make the cat your cat such as cat fur color (blue) and cat name (lolcat). You now have an instance of Cat called lolcat which presently has all of the attributes and methods that the class Cat has.

If your neighbor in Florida needs to replace her cat because the cat skinner got to it, then you instantiate a new cat for them from class Cat and give the new object the attributes of their new cat.



Edited 2 time(s). Last edit at 06/15/2009 01:48PM by pgens.

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: Shadow ()
Date: June 15, 2009 07:17PM

I have to wonder if you posted the question as a guest just to write the answer, pgens. Cute though.

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: pgens ()
Date: June 15, 2009 08:40PM

Very funny, evidently no good deed goes unpunished.

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: Lurker. ()
Date: June 15, 2009 08:59PM

Overall and very broad, an instance means a program running.

If you clicked on a program three times and started it running three times you would have three instances of the program,

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: pgens ()
Date: June 15, 2009 09:12PM

He says "OOP" in the title so my guess is he's asking about object-oriented programing as opposed to a program instance, who knows.

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: Lurker. ()
Date: June 15, 2009 09:24PM

I don't think he'll get the concept of OOPing instances with a complicated definition. Theoritcally you could say a program is an object or class.

I think the key here is to explain the concept that if MSWORD(the object) is running three times each running version needs to have seperate ID or unique name to be identified by the host\master program. Hence each ID is different, this is the concept of an "instance."

The same is true in OOP. You can have the exact same piece of code\class running multiple times but with different values in each instance.



Edited 3 time(s). Last edit at 06/15/2009 09:52PM by Lurker..

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: Confused ()
Date: June 16, 2009 12:34AM

I can assure you that pgens did not post the question. And Bob aka William D Henry has nothing to do with it either.

The lolcat example was perfect. When I explained it that way tonight they said, "You got it." I really, really appreciate the advice. The Word example also helped put it in terms that were more easily understood.

But then I opened up my big mouth and asked, "So couldn't we make all these instances platform independent? Do we really care whether they use Linux or Unix? Or the hardware we choose?"

Answer: "Your instance is part of 5 million lines of code. You have to do it our way. Much of the 5 million lines is a black box that can't be separated, even though you don't need it for your instance." I'm not sure I'm willing to buy that, literally, meaning pay for it.

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: pgens ()
Date: June 16, 2009 07:23AM

Confused Wrote:
-------------------------------------------------------
> The lolcat example was perfect. When I explained
> it that way tonight they said, "You got it." I
> really, really appreciate the advice. The Word
> example also helped put it in terms that were more
> easily understood.

Great, I'm glad it helped.


> But then I opened up my big mouth and asked, "So
> couldn't we make all these instances platform
> independent? Do we really care whether they use
> Linux or Unix? Or the hardware we choose?"

I don't know what your "black box" is, but your question is totally valid. I was talking more of OOP concepts, which will be true whatever platform you are on. I think the question you asked was how do we run our stuff on multiple platforms. To a decent extent, your Java apps are supposed to run on any platform there is a JVM for, which is practically everything. In practice it isn't as easy as "Save As..." but the ability is there to adjust where appropriate. Even the .NET architecture has a Linux option in Mono, though I haven't tried porting .NET apps to Linux. But objects and classes are concepts of OOP that are valid for all OOP languages. C++, Java, Delphi, C#, etc.

But yeah, being able to code in Java or using .NET relies on huge class frameworks that have already been built. It helps when those frameworks are available on multiple platforms because you then get some choice. Personally I don't think the hosting platform matters as long as your app runs in a client's browser. Go with whatever platform you and your team has the most experience and comfort with because the end-user probably won't know the difference.



Inka: please take your shit elsewhere, here we are trying to have an intelligent discussion and you are posting your continuous bullshit fights in threads where it isn't appropriate. It doesn't make sense that others have to take their legit conversations to PM just to avoid your thread-cluttering BS.

Options: ReplyQuote
l
Posted by: inkahootz ()
Date: June 16, 2009 07:31AM

l

edit by Cary: Account password compromised, disabled by administrator.



Edited 2 time(s). Last edit at 06/01/2010 12:51PM by inkahootz.

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: Lurker. ()
Date: June 16, 2009 09:39AM

Pgens is correct, all the OOPs code is always attached to a language or framework the prevents it from being truely object oriented. All systems should be designed toward an OOPs\module style. The concept of OOP's is a noble goal, but in reality it is some what fantasy.

When you start to add lots of "features" or options the usability of the code as OOP starts to deminish and the cost to maintain raises quickly. In many cases changing one OOP module/class can have a cascading ripple effect that is often unseen at the start. In many cases OOPs systems are scratched and re-written.

I agree with Pgens, make the frontend or user interface run in a browser so it can at least be viewed on multiple clients. Of course don't get to tricky in the browser or you'll have compatiblity issues across browsers(IE,Firefox,Opera, Safari).



Edited 2 time(s). Last edit at 06/16/2009 09:50AM by Lurker..

Options: ReplyQuote
Re: A Question for the OOP Hackers
Posted by: Gravis ()
Date: June 18, 2009 09:34AM

Confused Wrote:
-------------------------------------------------------
> But then I opened up my big mouth and asked, "So
> couldn't we make all these instances platform
> independent? Do we really care whether they use
> Linux or Unix? Or the hardware we choose?"
>
> Answer: "Your instance is part of 5 million lines
> of code. You have to do it our way. Much of the
> 5 million lines is a black box that can't be
> separated, even though you don't need it for your
> instance." I'm not sure I'm willing to buy that,
> literally, meaning pay for it.


the specific program they are talking about may only be available for windows. the "black box" being referred to is the Windows API/Framework. basically, an API is how the program tells the environment (e.g. windows xp) what it wants to do, like making a windows or getting mouse clicks. HOWEVER, it's total bullshit that you have to use the Windows API. There are other APIs available that can run on almost any platform. Qt is an API that is compatible with multiple programming languages and can be compiled for use on hundreds hardware platforms (everything from cellphones to desktops to game consoles) as compared to the two that microsoft uses: x86 (PC) and x86-64 (64-bit PC).

http://www.qtsoftware.com/

ive used this professionally and without a doubt it is the best API/framework because it has commercial support, it's well documented and it's portable. There is a special subset specifically for embedded platforms (cell phone, PVR, GPS, etc).



pgens Wrote:
-------------------------------------------------------
> > But then I opened up my big mouth and asked, "So
> > couldn't we make all these instances platform
> > independent? Do we really care whether they use
> > Linux or Unix? Or the hardware we choose?"
>
> I don't know what your "black box" is,


the black box he is referring to is the win32 API or perhaps .Net both of which are non-portable. yes there is WINE which runs 80% of apps (not games) but that's still 20% short and WINE's fundamental design is flawed. as for .Net, there is MONO but it doesnt run WinPE executables ("exe files") and it doesnt implement anything that is windows specific. im convinced it's a scheme that MS came up with so that anything that runs on MONO can be recompiled in a minute to run on .Net but .Net apps arent compatible and rarely do you have the source code to try to port it. Also, MS changes their framework anytime they like and deprecate the old framwork.

btw, Java is a slow ass piece of shit and it even compatibility issues (that they claim dont exist!) because of JVMs.



Lurker. Wrote:
-------------------------------------------------------
> Pgens is correct, all the OOPs code is always
> attached to a language or framework the prevents
> it from being truely object oriented. All systems
> should be designed toward an OOPs\module style.
> The concept of OOP's is a noble goal, but in
> reality it is some what fantasy.


it seems what you are referring to is portability. Object oriented programming is not language or library specific, it's a programming methodology. i'm saying this nicely, so beware of your response. basically, you dont know what the fuck you are talking about.


"the wisdom of the wise will perish, the intelligence of the intelligent will vanish."095042938540

Options: ReplyQuote


Your Name: 
Your Email (Optional): 
Subject: 
Attach a file
  • No file can be larger than 75 MB
  • All files together cannot be larger than 300 MB
  • 30 more file(s) can be attached to this message
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
  ******    ********  **    **   ******    **     ** 
 **    **   **        ***   **  **    **    **   **  
 **         **        ****  **  **           ** **   
 **   ****  ******    ** ** **  **   ****     ***    
 **    **   **        **  ****  **    **     ** **   
 **    **   **        **   ***  **    **    **   **  
  ******    **        **    **   ******    **     ** 
This forum powered by Phorum.