Hello,
I'm trying to learn to use PHP with an object oriented scheme. I think I understand the concept but I need real example, a forum exactly (the closest to what I want to do).
I know PhpBB but it's maybe too complicated to fully understand it so I'm looking for something simpler but still in object oriented.
Do you know any ?
Tha...
Hi all :)
I've been designing a database access layer that allows us to support multiple databases in our programs. In the end, the users of our programs shall be able to choose the underlying database system from a range of database systems. Some small clients might be happy with MS Access, others prefer MySql, others DB2. Those db sys...
How to get the path of the current class, from an inherited method?
I have the following:
<?php // file: /parentDir/class.php
class Parent {
protected function getDir() {
return dirname(__FILE__);
}
}
?>
and
<?php // file: /childDir/class.php
class Child extends Parent {
public function __constru...
I'm looking for an application developed in C# with following qualities, which is available as source code.
Based on OO Architecture
Must connect to DB.
Must handle atleast a "one to many master child" relationship (eg: Order and items ordered)
Should display the data using Datagrid or other similar controls.
Reports (either with repor...
How does undo work? Does it copy all the managed objects every time any of the values change? Or does it only copy the actual changes together with an information which objects were affected? Is that heavy or lightweight?
...
Hi!
I hope the title doesn't sound too subjective; I absolutely do not mean to start a debate on OO in general. I'd merely like to discuss the basic pros and cons for different ways of solving the following sort of problem.
Let's take this minimal example: you want to express an abstract datatype T with functions that may take T as inp...
So I have 3 classes.
Abstract class A
Class B extends class A
independent Class C
In class D that contains the main method, I create a list of instances of class B
List<B> b = methodCall(); // the method returns a list of instances of class B
Now in class C I have one method that is common to both A and B, and hence I don't wa...
What is the difference between a Class Abstraction and an Object Interfaces in PHP? I ask because, I don't really see the point to both of them, they both do the same thing! So, what are the advantages of disadvantages using both against one or the other?
Class Abstraction:
abstract class aClass
{
// Force extending class to define...
Greetings!
I inherited a C#.NET application I have been extending and improving for a while now. Overall it was obviously a rush-job (or whoever wrote it was seemingly less competent than myself). The app pulls some data from an embedded device & displays and manipulates it. At the core is a communications thread in the main application...
So I've started looking at ruby, and a lot of things look nice but I'm quite put off by implicit return statements. I understand making everything return self or nil by default but not the last value of a statement.
To me it looks horribly fragile (especially) if you are working with a method that doesn't plan to return something (espec...
I'm stuck thinking about the best way to go about setting a line segment's position, I have a class Line(length, angle, previous) being called from a class Polygon.. Right now I have:
public class Line extends Sprite {
public function Line(length:Number, angle:Number, previous:Line = null) {
if (previous != null) {
...
I am having some trouble understanding how to make System Sequence Diagrams, as I don't fully grasp why in some cases one should define operations for System -> Actor and in others don't. Here is an example:
Let's assume the System is a Cinema Ticket Store and the Actor is a client that wants to buy a ticket.
1) The User tells the Syst...
I am trying to do this, I'm a full time front-end dev and am aware that I am yet to achieve this.
When I am referring to OOP skills I am referring to understanding and being familiar with concepts like inheritance, polymorphism, encapsulation, abstraction.
I am aware that it may be more likely to achieve what I'm after by focusing on an...
I've stumbled across a couple of PHP Framework questions on SO. But like //so/questions/2648/what-php-framework it's mostly an itching on the surface or popularity contest. Skimming through each frameworks API or introduction docs didn't give me a good overview either.
However, I was wondering if there is something like a purely procedu...
Possible Duplicates:
What C++ open-source projects have good and clean code to learn from?
Code reading: where can I read great, modern, and well-documented C++ code?
I'm looking for something readable with good OO design, in the medium size-range. I'd call myself an advanced beginner in OO programming, and I'm hoping to f...
I suppose this could go for many OO languages. I'm building my domain objects and am not sure where the best place is for the interfaces & abstract classes.
If I have a pets package with various implementations of the APet abstract class: should it live side-by-side with them or in the parent package?
How about interfaces? It seems l...
Hi Guys,
I am experiencing something weird and have a workaround already, but I don't think I understood it well.
If I call the Method below numerous times within a class:
public void Method()
{
Foo a = new Foo();
a.Delegate1Handler = ViewSomething();
}
If I call Method() multiple times in one instance of the class that it is in....
(This is a hypothetical question for discussion, I have no actual problem).
Say that I'm making an implementation of SortedSet by extending LinkedHashMap:
class LinkedHashSortedMapThing extends LinkedHashMap implements SortedSet {
...
}
Now programmers who use this class may do
LinkedHashMap x = new LinkedHashSortedMapThing();
Bu...
This is more of a use-case type of question... but also generic enough to be more broadly applicable:
In short, I'm working on a module that's more or less a command-line wrapper; OO naturally. Without going into too many details (unless someone wants them), there isn't a crazy amount of complexity to the system, but it did feel natur...
hey folks,
I try to realize a little game project to dive deeper into OO programming (winforms c++/cli).
I already started coding but now I´d like to make a re-design.
For the beginning the game should consist of four parts like game-engine, user interface, highscore and playground. Heres a little (non-UML-conform) class diagramm to vi...