The best way to set up your development environment is to configure a localhost server on your computer. Let me explain what that means. When you access a web site, you're sending and requesting information from another computer through an Internet connection. That server can communicate and process the information in a plethora of possible configurations. For example, when you buy a computer, you have the option of getting a Mac or Windows-based machine. Or, if you want, you could run Linux, Unix, or even DOS. All these possibilities mean that for you, the user, the experience will depend on which operating system you choose. But let's say you want to print a document. Well, regardless of the operating system or how that operating system prints something, once the document is printed, it doesn't really matter what configuration the computer had; it's all the same to the reader of the document.
The Internet is a lot like this example. The computer/server at the other end that will be processing the requests and creating output could run just about anything. But the final output will be a web page of some sort or some kind of web output. For you, the developer, the configuration will matter a great deal. In fact, it will affect everything you do to create and serve a web site.
Developing in a Localhost Environment
When you set up a localhost, you're actually setting up a server on your own computer. You'll fire up a web browser like Firefox or Safari and type in something like
http://localhost to access the server like the user would if the web site were live. In effect, you're tricking the computer into thinking that it's talking to a web server when really it's talking to itself.Using the Localhost First, Remote Last
As long as your configurations on your localhost are the same as the configurations of the remote web server where the site will be hosted, you can develop on your own computer. Once the site is running well, you'll move the entire contents of your root directory or application to the server, and you're done. If you've done it right, the site should run all the same on the remote server.
Installing a new Cake application is simple and requires very little configuration to get up and running fast. Just remember to unpack the main Cake install file and rename the resulting folder to whatever you want your application to be titled. By checking the welcome screen, you can determine whether Cake is running correctly or whether a localhost error is present. Correcting errors is not too difficult. Just set the permissions correctly or adjust your Apache server configuration to handle Cake, and those errors should, in most cases, disappear. Your Cake application will require a few setup routines such as preparing the tmp folder, changing the Security.salt value in the core configuration, and connecting Cake to a working database. After these routines are complete, your application will be ready to be extended by creating models, views, and controllers.







0 comments:
Post a Comment