Friday, March 4, 2011

ASP versus PHP 4 MAC 2011

ASP = Actives Server Pages, PHP Hypertext Preprocessor

ASP and PHP are both programming languages that are commonly used to create websites. Unlike the usual static html web pages, ASP and PHP websites are more dynamic and can allow users to interact and exchange information using the website's databases.

ASP is the short term for Active Server Pages, a type of program that works with Microsoft alongside IIS or Internet Information Server. ASP needs a Microsoft Server for the website to work. On the other, PHP or Hypertext Preprocessor, runs using Linux or Unix server. The more updated PHP programs can now run on an NT server.

Platfrom
PHP programs can also run in Windows, Solaris, Unix and Linux while ASP can only work with Window-based platforms. Just recently, ASP can now run on a Linux platform given that there is an ASP-Apache program installed on its server.

Language Programme
If you were a programmer adept with the C++ language, you would probably be more comfortable using PHP than ASP. PHP uses C/C++ as base language and most syntax are similar to each other. Because a big chunk of programmers are still using C++ language, PHP are by far more popular than ASP.


ASP is very much similar to the syntax and interface of Visual Basic programming. This is basically because Visual Basic is basically correlated with Microsoft products and programs. So if you were a programmer, choosing between ASP and PHP would basically depend on which language you are more adept with.

Server Installation Cost
When it comes to costing and expenses, ASP programs needs to run on Windows with IIS installed on the server. You need to purchase both of these components in order for ASP to work. On the other hand, a PHP would only require running on a Linux server, which you can get at no cost.

Database
PHP is very much flexible when it terms of database connectivity. It can connect to several databases of which the most commonly used is the MySQL. Note that MySQL would not cost you a thing to use. But if you were to use ASP, you need to purchase MS-SQL, which is a Microsoft product.

Speed and Secure
Loading speed is a big factor in maintaining a website. If you are particular about speed, then you need to go with PHP. PHP codes runs much quicker than ASP basically because it runs in its very own memory space while ASP uses an overhead server and is uses a COM based architecture.

Cost
In working with PHP, most tools associated with the program are mostly open source software so you need not pay for them. As for ASP, you might need to buy additional tools to work with its programs.


In conclusion, both PHP and ASP have its own advantages and disadvantages. It basically depends on which part of developing a website you are most concerned with. Are you worried about the cost of creating your website? Do you want to use a programming language that you are more familiar with? Do you want a more stable and faster website? Choosing between ASP and PHP basically depends on your own personal preference. It doesn't hurt to confer with other programmers or webmasters and research more information on which programming would best fit the requirements of your website.
ASP versus PHP

Tuesday, March 1, 2011

Drag And Drop Flash CS3

This Flash CS3 Tutorial is about controlling graphics with the mouse, creating the tweens will not be covered. However, you will learn how to make the smiley face react to the mouse. Lets make the MovieClip do something every time the mouse moves over it. Start by coping the code from the example to the first key frame in the actions layer.

smiley_mc.addEventListener(MouseEvent.MOUSE_OVER , smiley);
function smiley(event:MouseEvent):void{

smiley_mc.play()
};

The code creates an Event Listener and adds that Event Listener to the MovieClip smiley_mc. Event listeners have been covered in more depth other Flash CS3 Tutorials. The Event Listener is simply listening for the MouseEvent Mouse over. Then once the event happens ActionScript is telling the MovieClip smiley_mc to play.

Press Control-Enter to see the Smiley Face react.

If you once again go into the Smiley MovieClip and look at the key Frames you will see how this works. When the Event Listeners detects that the mouse has passed over or onto the smiley_mc, actionScript tells the smiley_mc to play, thus playing the movie until something tells the smiley_mc movie to stop. In this case there are key frames in the actions layer that simply have the stop action added to them. You can create any form of animation inside a movie clip then use action script to control when the movie plays.

Drag and Drop
Lets add some more interactivity to the smiley face by adding a drag and drop ability.

Copy the example code and add it below the current event listener.
smiley_mc.addEventListener(MouseEvent.MOUSE_DOWN , smileyDrag);
function smileyDrag(event:MouseEvent):void{

smiley_mc.startDrag();
};

Once again you will see the slandered event listener. What is new would be the smiley_mc.startDrag();. The startDrag method tells Flash CS3 to enable a MovieClip to be moved around the stage. You define which MovieClip by placing the name of the MovieClip in front of the startDrag method, separated with a period. If you test the movie at this point you will see that when you click on the smiley face it movies with the mouse cursor., but how do you stop dragging the smiley around. Well, you need to add another Event Listener.
smiley_mc.addEventListener(MouseEvent.MOUSE_UP , smileyStopDrag);
function smileyStopDrag(event:MouseEvent):void{

smiley_mc.stopDrag();
};

The first Event Listener listened for the mouse to be pressed down. This time you need Flash CS3 to listen for the mouse up event. Since you want the smiley_mc to stop dragging when the mouse button is released you will add the method stopDrag to the MovieClip. Basically, you use the same thing to stop dragging as you do to start dragging.

RESOURCE: http://www.squidoo.com/flash_cs3_tutorial_DragAndDrop

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | belt buckles