Really very good job Mr. shabbi
thank U
|
Newbie Member
|
|
| 24Jan2011,01:31 | #51 |
|
Newbie Member
|
|
| 10Feb2011,17:45 | #52 |
|
Hello Shabbir,
Excellent article, however i have trouble getting the attachment project (97 KB when i DLed) , could you please look into this Suresh |
|
Go4Expert Founder
|
![]() |
| 10Feb2011,18:44 | #53 |
|
Hi suresh, I re-downloaded it and don't see any issues. If you still have issues getting the file email me and I will send you the file as an attachment.
xpertprogrammer
likes this
|
|
Newbie Member
|
|
| 16May2011,16:55 | #54 |
|
I have solved your problem.
-- Ashwin Parmar Code:
<?php
abstract class Control {
abstract function Show();
}
class WinButton extends Control {
function Show() {
echo "I'm a WinButton: ";
}
}
class MacButton extends Control {
function MacButton() {
echo "MacButton";
}
function Show() {
echo "I'm an MacButton: ";
}
}
class WinLabel extends Control {
function Show() {
echo "I'm a WinLabel: ";
}
}
class MacLabel extends Control {
function Show() {
echo "I'm an MacLabel: ";
}
}
abstract class GUIFactory {
static function GetFactory() {
if (TRUE) return new MacFactory();
else return new WinFactory();
}
abstract function CreateButton();
abstract function CreateLabel();
}
class WinFactory extends GUIFactory{
public function WinFactory() {
$btn = new WinButton();
$lbl = new WinLabel();
}
function CreateButton() {
print_r($btn);
return $btn;
}
function CreateLabel() {
return $lbl;
}
}
class MacFactory extends GUIFactory {
// Its there just to have the Classdiagram going
function CreateButton() {
return new MacButton();
}
function CreateLabel() {
return new MacLabel();
}
}
$factory = GUIFactory::GetFactory(); // Return MacFactory
$button = $factory->CreateButton(); // Return MacButton
echo $button->Show();
$label = $factory->CreateLabel();
echo $label->Show();
?>
Quote:
Originally Posted by ngungo |
|
Newbie Member
|
|
| 16May2011,16:56 | #55 |
|
PHP Code:
|
|
Go4Expert Member
|
|
| 23May2011,15:13 | #56 |
|
Nice article! It is very helpful for me! Thanks!
|
|
Newbie Member
|
|
| 5Jul2011,01:06 | #57 |
|
Which pattern is best for an ASP.NET website with SQL server database and .NET framework 2.0, Thanks.
|
|
Go4Expert Founder
|
![]() |
| 5Jul2011,08:08 | #58 |
|
The application of pattern depends on lot of factors and in your case the type of website you are creating. An ecommerce site in ASP and a CMS site in ASP may not have the same pattern applied.
xpertprogrammer
likes this
|
|
Newbie Member
|
|
| 5Jul2011,10:49 | #59 |
|
Quote:
Originally Posted by shabbir I wanted to know what basic pattern a new bie should follow, which is easy to maintain and work on. Or Are there some frameworks we should use. Mostly ASP.NET websites are developed using the code-behind page logic, or some develop interfaces implemented by the code-behind page and than pass the page instance to a controller or presenter. Any help from Shabir or other members, Thanks. |
|
Go4Expert Founder
|
![]() |
| 5Jul2011,13:51 | #60 |
|
Quote:
Originally Posted by r0o0cky |


