Dököll Solutions, Inc.
C# Development
Java Development PHP Development eBook Development Social Development CMS Development
Cloud Development LocalHost Development Mobile Development Charts Development Logs Development Reports Development

Design FAQ HowTo

Understanding a LocalHost Website as it Relates to and Differs from Intranet and Internet Sites

Research, Learn, and Share your knowledge, Contribute to society and be part of a Network. Make use of Open Source and Free to use software and re-submit to your community or forum

LocalHost Development

In computer networking, Localhost is a hostname that means this computer. It is used to access the network services that are running on the host via the loopback network interface. Using the loopback interface bypasses any local network interface hardware; Which then enables a web developer to launch a web page in a browser offline or using a web server locally (i.e. XAMPP, Apache Tomcat, and others).

Related Info: Journal Entries in ADF

Site News:

Benefit from our Referral program, Send friends and family to our Membership page. At new sign up, receive compensation, Free App Samples, Code, Design, etc... Download the Referral form to get started. Contact us if you have questions.

Translate Content

Translate contents of this webpage using the Google Translate plugin, available by selecting the drowpdown below... Google Translate is a multilingual neural machine translation service developed by Google, to translate text, documents and websites from one language into another

Content Resources:

We invite you to use all of the resources available on our website. We hope you will find downloadable samples and tutorials that you can re-engineer in own environments to create applications from scratch. Please contact us with questions, if additional support is needed.

Understanding a LocalHost Website as it Relates to and Differs from Intranet and Internet Sites

A Localhost is a hostname or local server location that is the currrent computer or machine. It is used to allow connectivity to services that are running locally only and is not connected to an actual packet-enabled device like a router (i.e. NetGear, Linksys). Since the current local machine is its own servicer of files (example: webpages and related files) to applications running within it, this also means that other devices or computers in the same location or that are connected to the Internet would not be able to access files or a locally developed website in HTML5, as one example, on that machine. This article will give you a better sense of the term LocalHost, how it compares to other means of connectivity with respect to a networked router or modem, Intranet and Internet sites, and what actually happens when developing websites and web apps on a computer not connected to the Internet.

What happens when Websites run via LocalHost?

We are going to start here, what really happens when a locally developed website or web app is running on a computer. As the definition of the term states, a LocalHost is a hostname that means this computer, the current system that is hosting your website files: the images, programming code (HTML5, jQuery, JavaScript, PHP, Java), among others. In some cases, configuration files such Cascading Stylesheets (CSS) need to be placed in specific locations (having an identifiable folder structure) so sites can find the configuration to load into web designs. Some websites are created with an Integrated Development Environment (IDE), like the Eclipse software, an open source tool. The websites still run in a LocalHost environment but require certain configuration files (example: JAR, EAR files) to be setup within the IDE.

An example of a locally hosted web application requiring IDE file configuration is a Java web app. Beyond the configuration file placeholders for this Java app, housed in the Eclipse IDE, in order to launch the web app to a browser, Eclipse will need to be configured with yet another open source web server software. We have been using Apache Tomcat, as our web server of choice for Java web apps. Tomcat also uses a LocalHost location to serve the Java app to the browser. It does this solely on the computer it is running on and does not connect to a networked environment. Other web applications that require special environments to run on LocalHost are PHP websites, among others that we will cover below. These sites need more than just a computer's environment to work because the files are server-based files. Developers do have options to run server-specific files in a LocalHost environment.

Developer Tools for Running Websites or Apps Locally

There is open source software such as XAMPP that developers can download to stimulate a LocalHost server that specifically enables running PHP-based websites with a server-specific configuration. XAMPP is a cross-platform web server solution consisting of the Apache HTTP Server that, when configured locally, it run PHP server scripts as if on a server environment, but on a computer. Enterprise web applications like ASP.NET and ADF also need server-specific environments in order to run in a LocalHost setup. An ASP.NET web app is built using Visual Studio. When the app is launched it uses an internal web server called Internet Information Services or (IIS), which serves the site to any default browser using a LocalHost address. Each LocalHost address does use a port that must be open and free so a site can be launched; developers should be mindful of that. Since web apps or websites that run locally use a LocalHost address, sites that try to use the same port number will not launch to a browser because the port in question is not free (it is being used by another website).

The most popular LocalHost port to run websites in a browser on a computer is port number 80. Developers can run some commands against their Operating Systems (OS), within the computer being used, to see if that port 80 is already taken. If the port is occupied, developers will need to assign a different port so the sites that need to be launched can use the LocalHost address. We are not going into too much detail on port assignments, but we wanted to mention ports as they relate to the different types of development environments we cover in this article. An ADF web app is created using the JDeveloper IDE. This development environment launches server-based ADF pages to a browser using an internal Integrated WebLogic Server, and the web app gets assigned a default, system-specific port to use with the LocalHost location.

We should perhaps mention that, IDEs that launch enterprise web apps such as ADF and ASP.NET make things easier for developers, these IDEs assign their web apps specific port numbers internally. For this reason, developers do not need to seek out whether the popular port 80 is occupied or taken, the enterprise apps will just use their pre-assigned ports. As a side note, remember that if you are developing applications or websites in different OS environments, each configuration for your sites may present unique needs to run them in a browser. Again, we are going to let you to do the additional research on that front, this is beyond the scope of the current article. We will touch up on additional server-based configurations when we discuss database connectivity below. We do want to cover all bases for you so that you get a better understanding of the term LocalHost as it relates to a computer environment.

LocalHost and Intranet Websites Connected in LAN Network

When a website runs via Localhost, it does not communicate with your ISP or Internet Service Provider's router or modem to reach the Internet. Localhost is a private IP address that points to the machine being used, and it's also known as a loopback address. As of this writing, the loopback IP address that identifies LocalHost is, there is a good chance that this address will not change. By hosting a localhost website or web app and its associated files on your own computer, you can interact with the site via a web browser (i.e Microsoft Edge, Google Chrome, Mozilla FireFox, Apple Safari) as if you were an end user. Within this secure, simulated localhost IP environment, a developer can debug a website or application, and run any sort of coding in a test or development environment that is setup locally.

There are instances where a LocalHost works as if networked, that is when an application, like ASP.NET web app, that is built locally, is also connected to a Local Area Network (LAN) or a Wide Area Network (WAN) because the computer itself is a networked machine. In this case, only the users that are "connected" to the LAN or WAN can see the computer that is running the local website or application. You should pay attention to the word "connected" here, because if the computer that is serving up the local ASP.NET website is either turned off or is not connected via a wireless connection or through a wired LAN, other networked machines will not be able to access the site or its files. We could dive into this scenario a little more but that also is beyond the scope of this article. For the purpose of simplicity, we are going to skip going into LocalHost web apps or websites that are accessible through a networked machine. We will instead dive into sites hosted on an Intranet environment.

Beyond LocalHost, an Intranet website allows developers greater visibility with their sites within the same network. Keep in mind, LocalHost web application files can also be migrated to networked services, as long as the same folder and file structure exists on the new network location or platform. What this means is, developers could as easily point Visual Studio files for their ASP.NET web apps to a server location. They would as well need to go into configuration files to modify server locations, but this can be done. After working on a website locally, developers will need to go through some important steps before deploying their website files to an Intranet web server. They can either publish their site to an IIS web server, within the Intranet, or publish the app to a cloud service, like Microsoft Azure. For this part of the reading however, we are going to assume that developers want to remain on the Intranet, to keep things local to the existing network. Once developers successfully publish their LocalHost web app or website to use the networked IIS web server, the site is truly on a networked platform, and can be seen by other users on the same LAN or WAN network.

Difference between LocalHost, Intranet, and Internet Websites

While an Intranet website is a locally hosted website that is served by a web server that a company owns and manages in-house, it is nothing like a LocalHost website. As demonstrated above, a LocalHost website is one that is served by this IP, a LocalHost-specific address that is not a networked IP address. Since the Intranet website is hosted by a networked server, it is likely equiped with the best security settings and has the capacity to receive and log multiple incomming user connections. This is important for two reasons, the Intranet website could have important information about the company that must be kept secure. Also, because any website that is accessible by multiple users must be up at all times so that information can be accessed in a timely fashion, security is also important here as well, the networked user must authenticate against the system (via networked computer or device). If the user is not part of the network, the Intranet should not be made available. Security and accessibility go hand-in-hand. If users is authenticated and belongs on the Intranet it is then permissible to access company information, this is where accessibility becomes important. As compared to a networked website, a LocalHost website or web app would have enourmous issues keeping up with demand in this scenario.

With multiple users seeking information, a LocalHost website would not be able to satisify multiple requests for imformation, and the site would more than likely crash. So, a website that has been developed, tested, and is ready to be deployed or published needs to be hosted on a server to satisfy demand. Another instance, beyond website availability, that governs the need to have a networked website as opposed to a LocalHost site is the strength of the network. Let us assume for example that the website is a data-driven PHP site with MySQL back-end, connectivity can be impacted by multiple user activity through the web server, thus a lot of bandwidth will be at play here, at the network and server level. The network's bandwidth is the maximum amount of data that can be transferred across a wire or cable. Server bandwidth is the amount of data that can be transferred between servers, sites, and users. A PHP website on an Intranet will most likely need maximum connectivity (enough bandwidth) to allow users to access data. With that in place, the Intranet site is strong and can accept multiple incoming user connections. This is one of the advantages that an Intranet website has over a LocalHost website.

Development Environment Strategies for Scalability Purposes

Needless to say, you can already see why a locally developed website would most likely make its way to a networked environment, if that is the web developer's intention. Developers at times build mockup applications as proof of concept to showcase at a project meeting. Some new app development tools may need to be tested locally first before presenting them to IT managers for consideration, developers may work in LocalHost environment to achieve this. Whatever the case may be, you will find that developers like to work in a contained location or space, thus working locally is usually preferred, until it is necessary to showcase a sample live. The usual cadance of a lot of application development projects is to migrate the work (code, design) that was created locally to a server location, with a file structure that is identical or pretty close to the LocalHost environment (i.e. \\servername\foldername\filename).

Some developers might actually prefer working an Intranet server environment instead. Either by preference or through mandate, some IT shops may require that developers work in a server environment so that they can keep an eye on the project's progress. It does depend on the resources available to company developers, and whether their Information Technology (IT) department has additional servers (or server space that can be segmented) to be used as test and development environments. In any case, developers will have environment options, to work locally and independently, have a separate test and development space (on company Intranet) to design and code their projects. Then, upon completion, they can migrate the work to production. As with the folder and file structure example from LocalHost to Intranet, the production environment would mimic an identical folder structure as the Intranet, servername, foldername, filename to avoid problems. To go even further, developers could decide to just take their work mainstream, on the world wide web, the Internet. This is a whole different arena that presents different sets of advantages, and security concerns; the company's IT shop will now have new sets of challenges to safeguard user data.

An Internet website gives developers the ability to showcase their work to a much wider audience, the whole world. While this sounds exciting, migrating an Intranet website to the Internet is not that simple, this is where developers really need to ensure that file locations are stantard across environments. The reason for that is quite logical and normal but you have no idea how easy it is relocate a file and forgetting to rename it's path; hence why having a standard foldername or file location sequence will save developers time and effort. If for example, HTML5 and PHP page URLs or even ASP.NET and ADF URLs are broken when project files are migrated to a different location, it usually has to do with file locations that have changed, and the links to those files in a browser therefore will not work. All of this has to do with planning, from working in a LocalHost, Intranet, test and development environment, developers need to have a file structure that is followed across environments to limit or avoid problems.

For an application development project to be successful, the developers have to do their part, design and code the application with scalability in mind. Write efficient code, test and test the code so that the application is a smooth experience when it is used. The IT department also needs to do its part, because this is a project that will impact a lot of people, from the employees that will use the application for day-to-day activities to external users. The company's IT administrators will need to ensure that security settings are in place, especially if the built-in security on the website was setup to work locally, on the company's managed Intranet server(s). More importantly, the company will need to ensure that the IT department has all of the resources needed to ensure the application is successful in production. We are going to see what this might look like in our next and final segment for this article.

Options for Intranet Website Migration to the Internet

Beyond the current Intranet environment's security settings, which may not be portable when migrating a website to an Internet platform, developers may now need additional and more robust security to safeguard their websites. Not only do they need to have adequate security in place in the new environment, the company's own IT shop will also need to beef up secrurity in-house. After all, user activity will come from the world wide web and within the organization that owns the website. Security settings have to be top notch for users who traverse their company network, using company computers or devices, to access the Internet-based website. All of which can open up windows of opportunity to would-be bad actors who seek to hinder and harm the company through unchecked security holes.

Migrating an Intranet website to the Internet can present several challenges, in addition to security, including: Data that can be lost during migration due to incorrect data field mapping, data conversion errors, or if data are not transferred properly or not at all. Connectivity can be an issue, if the Intranet website being migrated has large amounts of data to migrate and there is limited bandwidth on the wire, the process can be difficult. If developers are migrating a PHP website to a hosted CPanel, this means that, the actual process of migration will consume some bandwidth as data are transferred from the old server (Intranet) to the new cPanel host. This is usually covered by the company or IT shop's existing ISP plan. The infrastruscture or platform that the website is being migrated onto may be quite capable of accepting the load but the originating network may not have adequate strength for file uploads or migration.

How to Stay ahead of the Game Post Website Migration

Consequently, a company will need to have the resources to purchase a web hosting plan that will be able to accept massive amounts of data from the Intranet website. Developers will then need to do their own research and to ensure that the chosen cPanel hosting plan aligns with the website’s needs in terms of storage and bandwidth post-migration. Some cPanel hosting services offer "unmetered" bandwidth, which means there are no strict limits, but excessive use may lead to throttling or the need to upgrade the plan. Even after migration, it is extremely important to monitor the site’s new environment when it comes to bandwidth usage, to ensure it stays within the limits of the hosting plan purchased. If the website is experiencing increased traffic or is consuming more resources than expected, developers should advise upgrading to a better plan to accommodate the higher bandwidth requirements. Any application being migrated to another platform, server, or network insfrastructure will be impacted by bandwidth.

Developers need to not only account for bandwidth to predict how the website or web app will perform, they also need to be sure that their site is well-designed and coded. Regardless the type of web front-end, PHP developers, ADF software engineers and others need to write their code in a manner that does not impede performance. With respect to an ADF application migrated to a Cloud Service, for example, whether or not bandwidth is an issue, pages and files in the web app can load slowly if the app's design calls for multiple images to load at the same time. Or, in some cases, if large PDF files need to launch through links on some of the pages, latency issues could leave users wondering if the site even works.

Furthermore, in terms of database calls to a MySQL back-end, poorly written SQL commands can bring the database to a halt. In turn, companies may experience indirect costs like reduced productivity while employees or external users wait for the new system to come back online. Downtime is a major obstacle to migrating a website. Common issues can be avoided with careful planning and consideration. Some common mistakes include poor strategy, underestimating the scale of the migration, and not testing or planning. To avoid this, at minimum, developers should make sure they test, test, and test their applications prior to migration. Developers should also test in the new environment before giving the green light to release the site to the public. Most importantly, the company who owns the website should plan to have the resources on hand to ensure that the best web hosting plan or cloud service is available for the migration to be a success.

Scroll for Additional LocalHost Links...

Social Content

Download in computer networks, means to receive data from a remote system, typically a server, such as a web server, an FTP server, an email server, or other similar systems. This contrasts with uploading, where data is sent to a remote server. A download is a file offered for downloading or that has been downloaded, or the process of receiving such a file.

Most Popular How-Tos

How to Create CSS Webpages How to Create HTML5 Webpages How to Create HTML5 Webpages
How to Create CSS Webpages How to Create HTML5 Webpages How to Create jQuery Webpages
Create CSS Webpages Create HTML5 Webpages Create jQuery Webpages
... ... ...
How to Create Ajax Webpages How to Create JSON Webpages How to Create PHP Webpages
How to Create Ajax Webpages How to Create JSON Webpages How to Create PHP Webpages
Create Ajax Webpages Create JSON Webpages Create PHP Webpages
... ... ...

How-To Create LocalHost Applications

Program by Example:

Cut and Paste all code, design snippets, or complete application samples and run them in your environment to see what they do, modify them to your needs or turn them into something truly special.

Keywords: XPath

Courtesy: Döcu Content - See more Cut & Paste here...

Green Coding Habits

Make your work count, add comments and instructions to your code, thoroughly test your samples before submission (mention what may still need additional testing), try not to be a litter bug in your community or forum, help save time and effort. Be Green! After all, what is the purpose of your submission if it cannot be used or comprehended. Might be a good idea to also mention, or at least give credits to works being used in your submissions.