Saturday, May 30, 2009

Scared on OOP.....

Hay guys, You might be thinking why I am back on my blog after a long time. It's simply b'cause the encourage I got from one of my friends called Gogula and I use to call him gogus most of the time. Thanks man. Ok, here I start it again with OOP & C# .

Before I start anything on this topic let me explain what is an object.

What is an object?

Ha, that could be anything around you in real world. For example your CPU.

What we should consider of an object as a programmer? It's state and the behavior.
I wil just take a scenario that would helpfull you to understand as a programmer, what is an object?. If you were asked to develop a student enrolment application what would you conside as your objects in this application. I will point two objects Student and the Course but there are many more, I will leave you to point after reading this blog.

As I have mentioned above we bothered about state and the behavior of an object.
An object's state is the data and information it contains. For example, If you have a CPU object, it's state could be RAM speed and hard disck capacity. An object's bahavior represeted by it's methods. For example, in your CPU object play movie could be a method.

There are three underline concepts
Encapsulation
Inheritance
Polymorphism

Encapsulation

Encapsulation is a process of binding both data and methods together inside of an object.
Protection and information hiding are techniques used to accomplish encapsulation of an
object. Conside the following Class.


public class Box{
public Box()
{
}

protected double height;
protected double width;
protected double length;


public double GetVolume()
{
double volume = height*width*length;

if(volume<0)>

return volume;
}


}

Monday, March 12, 2007

Classic ASP debugging

I was frustrated searching for ASP Classic debugger, eventually I found a stady way to do that...Open you ears widly.............

use <'% stop %''>it will break the execution on the stop statement and u can debug in VSInterDev.

Classic ASP debugging

I was frustrated searching for ASP Classic debugger, eventually I found a stady way to do that...Open you ears widly.............

"<%Stop%>" this will do the magic
... <% stop %>it will break the execution on the stop statement and u can debug in VSInterDev.
Saturday, November 04, 2006

CSS

I have been thinking about what are the best CSS practices. I got this from one of my friend. I’ll open it up to everyone for share it.


Build and test your CSS in the most advanced browser available before testing in others, not after.
If you build a site testing in a broken browser, your code begins relying on the broken rendering of that browser. When it comes time to test in a more standards-compliant browser, you will be frustrated when that browser renders it improperly. Instead, start from perfection and then hack for the less able browsers. Your code will be more standards-compliant from the start, and you won’t have to hack as much to support other browsers. Today, this means Mozilla, Safari, or Opera.
Don’t use quotation marks around paths/URLs.
When setting a background image, or loading in an imported file, resist the urge to surround the path with quote marks. They’re not necessary, and IE5/Mac will choke.
Try to avoid applying padding/borders and a fixed width to an element.
IE5 gets the box model wrong, which really makes a mess of things. There are ways around this, but it’s best to side-step the issue by applying the padding to the parent element instead of the child that gets a fixed-width.
Combine selectors.
Keeping your CSS light is important to minimize download times; as much as possible, group selectors, rely on inheritance, and reduce redundancy by using shorthand.

My Achievements

Member of

Blog Archive

Followers

free counters