PHP

FullSail Repost

As part of my online classes, we participate in weekly discussions on various topics. This weeks was about:

1. The difference between a server-side language (such as CFML), a server-side platform (such as Adobe ColdFusion Server), and a server-side development framework (such as CFWheels).
2. The inherent statelessness of server-side applications, and how some platforms work around this statelessness using tricks such as Sessions.
3. The pros and cons of at least two server-side platforms or languages.

I got a lot of nice remarks on my post, so I figured I would share it:

There are many differences between a server-side language, like ColdFusion, a server-side platform, like Adobe ColdFusion Server and a server-side framework, like CfWheels. The server-side language is the language the server processes and what you will be using when creating your pages. Server-side languages need a server to process the language and that is what is called the server-side platform. When you use the server-side language of ColdFusion, your server-side platform will be Adobe’s ColdFusion Server. This is what you install on your web server to run your pages. Most languages have what are called Frameworks. What these essentially are is a group of pages that someone else created, that you can use in your source to make things easier. Certain things are already done for you and you essentially just have to plug in your data and the framework displays/updates the data with prewritten code.

I have used Coldfusion (version 5-9) for the past 4 years and couldn’t be happier. The rapid development times alone should be reason enough to check this language out. With a huge library of tags built into the language, you can create the code to do many advanced functions in just a few lines. Now the main complaint the ColdFusion community (which is huge, helpful and always growing) hears from the PHP Community is the price of ColdFusion. Now the server costs are more than what people are expecting to pay, which is $0 but you have to think of that initial cost as an investment in the language. There are many posts proving this (Link – which shows even more great reasons to use ColdFusion) and as you will see, the time you save learning the language, developing the app, and then the time saved on maintenance and support, shows that ColdFusion is actually the cheapest language to use based on that criteria. Also, not to forget but there is a FREE, OPEN SOURCE version of ColdFusion used all over the web called Railo. The only difference between Railo and the Adobe version are a few tags but Railo is constantly improving the language and new tags are added all the time.

Now to be fair, I have used PHP in the past and actually wrote a few websites with it back before I learned ColdFusion and it wasn’t a terrible language. Server setup was pretty simple and changing the configuration file was also pretty easy. There are also a TON of sites written in PHP so usually if I Googled an error, somewhere, someone would have the answer but my main complaint when using PHP was the amount of code I had to write to achieve a certain function. To get a decent PHP page took long hours and tons of lines of code and really made me dislike the language more and more. Also PHP is very OOP and I was never fond of that type of programming. I would reccomend learning PHP first before any other languages though. If taught correctly, it can be a great introduction to server-side language and development but people should explore the other options.

The statelessness of server-side applications can be hard thing to grasp at first but as you begin to develop applications, you will learn real quick. Essentially, all pages that you create that use a server-side language do not contain the data until they are requested. Unlike a regular HTML page that contains all of the data, regardless of any user conditions or page variables, the dynamic page just sits there, waiting to be requested and process the code. The main issue with this is that there is no way to save the page for a particular person, without having to create for each user and with sites with hundreds of members, this would just not be practical. A way around this is using Session Variables and/or Cookies. An easy example of this is a login form. When you login to most websites, you do not have to login again until you close the browser or physically log out of the system. This is done via Session Variables. Session Variables are a sort of global varial that has ties into the browses, so they can be cleared whenever the user closes their browser. When you login somewhere, a Session Variable is created and is stored in the server’s memory to remember you. This way, you can have one dynamic page but have millions of different kinds of data show
up.

What do you think?

read more