You are currently browsing the category archive for the ‘Uncategorized’ category.

I’m trying to understand Forms authentication, membership classes….

Expectations kill. It not only kills but in our modern day lifestyle, it is probably the meanest vice that make our life full of restless waves.
If I’m asked, what is your primary goal in your life, what do you want in your life, I’ll answer in negative.
I don’t want anything.
Now here is the catch. Do I really believe it?
I look upon, want to go down into my mind, and, oh my goodness, I find out just the opposite!
It is full of expectations. Though I can see, hear, walk, do other physical activities more or less, but still I want more.
What I want?
I want money, honour, success…..I’m full of pride, envy, my ego stays above everything. If I don’t get what I want, I get insulted. Anger is the meanest vice that often blurr my visions. I can’t think logically.
Where is love? Lust overpowers love.
Expectations overrule everything. I want more and more…..and never reach peace.

I am really in a bloody good class struggle that happens everyday in asp.net!!!!!!!

The first and foremost diffrence between these two great dynamic language is: simplicity.
To start working in PHP takes less than five minutes!
Yes, if you use Windows, just download WAMP and go to the www folder, create your own folder and save a php file (as you wish name it index.php) and starting WAMP server you can see the output.
The whole process will take less than 5 minutes.
If you are in LINUX/UBUNTU, then I’ll suggest to download XAMP for LINUX and running it there also will not take more than 5 minutes and less than 10 minutes :)
But in case of ASP.NET, to install VS it might take an hour or more!
Getting VS(you can download it from Microsoft directly, obviously not the enterprise one but the student edition), but again then it’ll take a fair amount of time.
So, if you consider the simplicity, PHP puts ASP.NET much behind.
Now, when the working environment is concerned, getting PHP codes is also much easier. Though, .NET community is also very strong and there are few good forums all around, but working in ASP.NET takes much more time than PHP.
In one aspect, I think ASP.NET puts PHP behind, is its user friendliness. In VS you can drag and drop great web controls that are ready to serve your order. You don’t have to write much code.
In PHP, there are thousands of functions but all you have to write single-handedly.
I don’t know much about the ZEND framework. Is it like VS where you can get the help of in-built functionality?
If anyone knows about it, please let me know.

In PHP I took reference from Beginning PHP 5 and MySql 5 By W Jason Gilmore, Appress book.
A method is quite similar to a function, except that it is intended to define the behavior of a particular class. Like a function, a method can accept arguments as input and can return a value to the caller. Methods are also invoked like functions, except that the method is prefaced with the name of the object invoking the method, like this:
$object->method_name();

Methods are created in exactly the same fashion as functions, using identical syntax. The only
difference between methods and normal functions is that the method declaration is typically
prefaced with a scope descriptor. The generalized syntax follows:
scope function functionName()
{
/* Function body goes here */
}
For example, a public method titled calculateSalary() might look like this:
public function calculateSalary()
{
return $this->wage * $this->hours;
}
In this example, the method is directly invoking two class fields, wage and hours, using the $this keyword. It calculates a salary by multiplying the two field values together, and returns the result just like a function might. Note, however, that a method isn’t confined to working solely with class fields; it’s perfectly valid to pass in arguments in the same way you can with a function.
Methods are invoked in almost exactly the same fashion as functions. Continuing with the previous example, the calculateSalary() method might be invoked like so:
$employee = new staff(“Janie”);
PHP supports six method scopes: public, private, protected, abstract, final, and static. The first five scopes are introduced in this section. The sixth, is static.
$salary = $employee->calculateSalary();
Public methods can be accessed from anywhere, at any time. You declare a public method by
prefacing it with the keyword public, or by foregoing any prefacing whatsoever. The following
example demonstrates both declaration practices, in addition to demonstrating how public
methods can be called from outside the class:

class Visitors
{
public function greetVisitor()
{
echo "Hello
";
}
function sayGoodbye()
{
echo "Goodbye
";
}
}
Visitors::greetVisitor();
$visitor = new Visitors();
$visitor->sayGoodbye();

Now let’s see what happens in ASP.NET, or to be precise in C# :
I got a good answer from EggHeadCaffe
The major difference between methods and functions is that methods called by the reference variables called objects where as the functions do not having any reference variables.methods are invoked using objects.wheres as in case of functions here is no quesion of objects.we call it directly.
And yet another good answer from StackOverflow
A function is a piece of code that is called by name. It can be passed data to operate on (ie. the parameters) and can optionally return data (the return value).

All data that is passed to a function is explicitly passed.

A method is a piece of code that is called by name that is associated with an object. In most respects it is identical to a function except for two key differences.

It is implicitly passed the object for which it was called
It is able to operate on data that is contained within the class (remembering that an object is an instance of a class – the class is the definition, the object is an instance of that data)
(this is a simplified explanation, ignoring issues of scope etc.)

Ususally people make resolutions before a year starts.
I’m slightly different. So I start it midway, almost, as May is knocking the door yelling with temperature around 40 degree at noon though in the ‘midnight summer’ I find it cool.
So what is my new resolution that I’ll (any one bets on that) break, that is also midway :) .
The resolution is I’ll try to write something, some words, oh, every word has its own universe, so you can imagine how heavy it can be to bear it in mind without putting it on digital paper.
So I’ll be a compulsive blogger. I don’t tweet. In fact, twitter attracts too many crowd, and I don’t like to stand in the crowd, I don’t like to follow other people, don’t like to be followed, so no tweeting at all, I’m happy with my big fat blogs.
And hopefully I’ll try to write it regularly!

As a layman Programmer I’d like to say something about these two great dynamic web languages.

I’ve done some PHP,  later I switched over to ASP.NET to find out that there is a vast difference between these two.

I’d like to write on it in a few installment.

Hope everyone concerned will post there comments on this interesting subject.

I like WordPress for its PHP support.

I have recently installed UBUNTU and LAMPP. I’d like to work in PHP also, after all its my first love.

One of my site that I developed experimentally in ASP.NET

Another one of my site that I developed experimentally in ASP.NET

Archives

Calendar

May 2012
M T W T F S S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 8 other followers

Flickr Photos

My pet readymade website

readymade personal website

a small business web application

More Photos
Follow

Get every new post delivered to your Inbox.