HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


ocPortal Tutorial: Web-applications, ocPortal, and PHP

Written by Chris Graham, ocProducts
This tutorial will provide some background into the different kinds of solutions that are out there for creating websites. It is not only specific to ocPortal – rather we hope to explain the inherent advantages of using a CMS such as our own.


What a website is

You know what a website is from an experience point-of-view: a site consists of pages, with each page having a URL ('web address'), and where pages are joined to other pages via hyper-links. You probably do not know what a website is from a technical point-of-view though, and it's a good idea to understand some of the basics because it will help you decide what direction to go in with your website (by properly understanding the alternatives). Let's go through what we do know…

  • a site consists of pages
    A website is built with web pages. The natural thing is to think that a 'web page' is a self-contained document. In actual fact, a web page usually consists of separate files (such as images, sound-clips or videos) that are tied together by a programming language called 'HTML' (†). An HTML file contains code required to put all the pieces of a web page together like you see on your screen now (e-mails can also be made in HTML). Also specified in the HTML file are the instructions for displaying the text you are reading now, including the font-size, colour and style. All these elements will produce a web page, and the mix of Human-text and computer-code can often be very daunting when it comes to writing or editing an HTML -- this is why people often use additional computer software to create web pages for them.

  • each page has a URL
    URLs actually encode a number of things that together provide all the information needed to retrieve a page from the world-wide-web. This isn't unlike real-world addresses, which usually need to include a human name, a house number and a post-code/zip-code. The main two things a URL encodes are:
    1. the computer a page is stored upon (a 'web server') – http://ocportal.com/example.html
    2. the name of the page on that computer – http://ocportal.com/example.html
    For a simple web-page, (2) is simply a filename that the computer reads from its hard-disk and sends back.

  • pages are joined to other pages via hyper-links
    Fortunately there is not much to explain here beyond what you already know. Pages each have their own URL, and it is these URLs that are used for hyper-links.


So, from a technical point of view, a website is a bunch of files put on a computer that you access by giving a URL through a web-browser. Well done for reading so far – there are just a lot of facts and terms, but it's not all that complex once they've sinked-in. Just like when you go to a restaurant for a meal and go through a standard ordering procedure, web browsers and web servers also have a standard operating procedure.

† Some websites are also written in Adobe Flash, which is a proprietary alternative to the normal HTML/CSS/Javascript combination. Flash works via a web browser plugin which is installed on most people's computers. The advantage to Flash is that it allows richer animations and effects, but it comes at the cost that Flash sites are less accessible, don't run on all web browsers (e.g. iPhones), you are required to buy Adobe Flash to make the animation, and there is a high reliance on Adobe's business. Often sites will mix Flash and HTML, using Flash for specific regions of the site that require sophisticated animations, or for playing videos. ocPortal is HTML/CSS/Javascript, but has features to insert Flash very easily.

Types of website

In this section I will explain the different types of website, and how they tend to be made, in order to help you decide what you want.
Along with the types of site below, sites can also be categorised as 'websites', 'intranets', or 'extranets'; this has little bearing on the technology used to implement them though.

Site of pages

This is the simplest kind of website, and was predominant a few years ago. A site would simply be a collection of files stored on a web server. People would type in the appropriate URL, and the files would be viewed.
Pages did very little – "dynamic" or "interactive" features were usually limited to things like "hit counters".

A site of pages may still be appropriate for a limited few, but web users generally expect more nowadays.

Site of dynamic pages

One step up from a "site of pages" is a "site of dynamic pages". The distinction here is that instead of our website consisting of "a bunch of files on a web-server", our website now consists of files that generate pages dynamically. The website is now a computer program rather than a document. When a page is accessed by URL, the web-server now asks the computer program to generate a page for it to send out.

By making a website-dynamic we can include things such as regularly updated news, without having to edit whole front pages to manually include links to latest articles as they are written. We can make pages interactive, randomise their content, and tailor them to the visitor who is viewing them.

All further types of website type described in this section consist of dynamic pages, but are extended to further levels.

"Content Management System" powered site

The next step from a "site of dynamic pages" is a site powered by a "Content Management System" (CMS). The line between dynamic pages and a full-blown CMS is indistinct, but generally a CMS will allow you to:
  • login to your website and to manage it from a special administration part of the website itself
  • manage/change/add things in an easy fashion that does not require you to be a computer programmer. The site will have less assumptions built-in (allowing you to manipulate content, rather than having to consider content, layout, and function all at once)

"Content" of a traditional CMS consists of well-organised pages or articles.

Content-type sites

In recent years, 'Blogs' have become popular; these are like cut-down CMS, where the content consists only of very simple, and generally unorganised, news postings.

Gallery sites are also popular, where the content consists of images.

Shopping-cart sites

I'm sure you know what a virtual shopping-cart is due to websites such as Amazon. Shopping-cart sites tend to focus on products listings, and methods for choosing and purchasing products on-bulk. In many ways, a shopping-cart site is a CMS site that is focused on products.

Community/social-networking sites

Community sites provide features for interaction between users, such as:
  • member registration (to get a unique user-name and account)
  • discussion forums
  • polls
  • chat rooms
  • content-commenting

Through these features, a virtual community is created: members register themselves, and communicate with yourself and each other. Members tend to become further drawn in over time, and like in the real-world, develop a sense of belonging.

Portal sites

A portal site is a site generally centred around a vibrant front-page, where fresh and varied content is presented. Some forms of portal site are very corporate, and focused on providing facilities to a user (Yahoo!, for example), whilst others are more community-orientated.

Web applications

A CMS is an example of a web application, but the category of "web application" is much broader. A "web application" is a piece of non-trivial computer software that operates over the world-wide-web, but could equally run as standalone (although an Internet connection might still be required for that). Examples of web-applications include search-engines, web-mail, and on-line mapping software.

Trends

In recent years, 'Blogs' have moved from a subcultural phenomenon to the most mainstream method of on-line publishing. Small personalised websites have largely disappeared in favour of blogs, and  blogs have become a vehicle for corporate PR.

Web applications have grown in complexity, as web developers have become increasingly aware of methods for interaction that are as quick and easy to use as normal desktop applications (due to the influence of Google). These techniques are popularly named "Ajax techniques". Now instead of filling in forms, applications are being made that incorporate techniques such as "drag & drop".

There has been a lot of hype about "Web applications" over past years using different technologies, that you may not have heard of, such as "Java" or "SOAP" – but "Ajax" is actually being used on a scale that these never actually reached

CMS systems are becoming more sophisticated and all-encompassing, with support for wider varieties of content. Forums (from "community sites") and galleries (from "content-type sites"), for example, are now available in CMS systems alongside the more traditional articles and pages. One example of this is our own system, ocPortal.

Overview of the advantages/disadvantages of different types of website

Site of Pages

Likely technologies

Simple collection of files

Likely deciding factor

Want to make simple pages, with little need to modify them again.

Cost

Low

Negative factors

Very tedious to update.

Unimpressed visitors.

Severe limit on functionality.

Options for you

Use an editing application such as Microsoft Frontpage.

OR

Employ a web-designer.

OR

Use a 'site builder' tool, like those that are often provided with web-hosting.

Site of Dynamic pages

Likely technologies

PHP, Java, ASP, Ruby on Rails

Likely deciding factor

Want highly customised dynamic pages, but without a need to make regular changes.

Cost

Medium, assuming needs are limited to a very small set of specific features.

Negative factors

Very tedious to update.

Why not go for a full CMS? It's a similar cost, but with much greater value.

Options for you

Employ a programmer.

“Content Management System” powered site

Likely technologies

[Product]

Likely deciding factor

Want to be able to add content and not worry about page layout for everything added.

Have more advanced needs, such as the need to be able to turn content on and off, or have multiple members of staff.

Cost

Medium (something like ocPortal, which is free, but might take a bit of time to setup for a very tailored website)

Very high (a corporate-only solution such as Vignette)

Negative factors

As a more advanced technology, there is more to understand if the product is customised by the same person who is to regularly use it.

Options for you

Use a product such as ocPortal. Depending on needs and experience, employ specialists in the software (such as the makers themselves) to get the website installed and customised.

Content-type sites

Likely technologies

[Product]

Likely deciding factor

If needs are very specific and common (such as only needing a gallery or a Blog).

Cost

Low

Negative factors

The potential for expansion is severely limited.

Why not go for a full modern CMS that incorporates the content-type (such as ocPortal)?

Options for you

Find an appropriate product. Depending on your experience, you may wish to employ specialists in the software (such as the makers themselves) to get the product installed and customised.

Shopping-cart sites

Likely technologies

[Product] / CMS customisation

Likely deciding factor

If you need to sell items from a medium+ inventory on-line.

Cost

Usually high, although some lower-cost products.

Negative factors

An on-line-store must face complex sales tax and shipping issues.

Options for you

Find an appropriate product.

OR

Pay for a CMS (such as ocPortal) to be customised. This would be appropriate when general-CMS features are needed as well as shopping-cart features.

Community sites

Likely technologies

[Product(s)]

Likely deciding factor

If it is desired for visitors to get involved with the site. Whether this is desired is often dependant on the “personality” of the organisation, but having a community can create brand value, improve customer service, help you engage with your users, and improve your market presence.

Cost

Low

Negative factors

When visitors can interact with each other on a “private virtual property”, issues of responsibility and exposure need to be considered.

Options for you

Find an appropriate product, such as ocPortal.

Portal sites

Likely technologies

[Product] / Bespoke solution

Likely deciding factor

If it is important to get repeat-visits for something other than the primary content of a website.

Cost

Medium (Product)

High to very-high (Bespoke)

Negative factors

It is difficult to effectively compete with large portals, such as that of AOL, unless the portal fits in a yet-untapped niché.

Options for you

Find an appropriate product, such as ocPortal.

OR

Hire programmers to create a bespoke solution.

Web applications

Likely technologies

Bespoke solution, although often based on some kind of framework

Likely deciding factor

If something very unique is needed.

Cost

Very high

Negative factors

This is very high cost – it is full-blown software development, requiring a variety of different skills.

A development team writing a custom system has little incentive for their code to be easily maintained, as they can just charge you more if their code is difficult to update.

You will be charged every time you want to add a feature.

Your features won't be as tried and tested as those in an established product.

Options for you

Hire programmers to create a bespoke solution.



ocPortal

Thumbnail: A screen-shot from a default ocPortal site

A screen-shot from a default ocPortal site

ocPortal is a website engine that drives powerful interactive and dynamic websites, by providing a wide range of features that are useful on many different kinds and themes of website. For example, ocPortal can easily power any of the following:
  • a community forum
  • a corporate intranet
  • a corporate website
  • a personal blog
  • a community blogging system with thousands of different bloggers
  • a collaboration community
  • a community gallery
  • and much more, and any combination thereof

Thumbnail: Logging in to ocPortal

Logging in to ocPortal

Thumbnail: A screen-shot from the Admin Zone of a default ocPortal site

A screen-shot from the Admin Zone of a default ocPortal site

The ocPortal philosophy is that almost all cutting-edge websites, from hobbyist communities, to those of large international companies, share a large number of common needs. ocPortal caters for all these needs by providing a vast pool of features that can be used as a part of the website. As you expand or change your website, ocPortal continues to provide: you simply start using features that you did not need to use before.

At the time of writing, we do not know any other products that have such a large built-in feature set as ocPortal. However, ocPortal also excels in customisability: the features in ocPortal can be fully customised on a number of levels, so that even though different websites share the same engine, they can have their own individuality.
Thumbnail: ocPortal is an extendable architecture as well as a product

ocPortal is an extendable architecture as well as a product

In addition, we understand that often users will have very specific, personal needs. For this reason, we make sure that the ocPortal framework is fully extensible, and provide numerous features to allow such extension to be achieved, suitable for different levels of expertise and requirements. It is important to understand that adding unique features can be difficult, as it is a programming exercise: but it is considerably less difficult than creating a new web application from scratch (even with a totally custom new module , most of the needs, such as user authentication, WYSIWYG editing, or secure database access, are already available), and ocProducts is available for those wishing to hire our expertise. Contact us if you need our team to do commercial development for you.

Why not product-X?

Most of the competitors to ocPortal are, like ocPortal, Open Source. However there is one critical difference that sets us apart from most of them – ocPortal is commercially backed. There are many reasons to avoid (most) Open Source software that is not commercially backed, especially:
  • the developers expect you to 'fix it yourself', or quite possibly, the developers have disappeared leaving the project stagnant
  • the developers think that 'you have to install it manually, because having an installer would just leave users ignorant to the projects internal workings'
  • the developers greet suggestions with fury: they don't get paid, and don't tolerate negative feedback for their efforts. Features are added on developer whim, rather than according to a plan that benefits the end users
  • the product reflects far from a stream-lined vision
  • whilst the developers are happy to code for free, they will not do the dull stuff like write documentation, or design user-friendly interfaces
  • there is great infighting and rivalry between developers
  • many features are only available within non-bundled addons. You'd spend half your time trying to smooth over the cracks between the various addons, or you'd need to tolerate the lack of full integration. Being able to search the various kinds of content on a website at once is a pretty basic thing, right? We don't know of any of our competitors that provide this kind of thing.

With a fully commercial product you may often find:
  • a quick dispatch to your suggestions: "we don't support this". The developers are personally unreachable
  • the community suffers from the fact that a reduced number of people are willing to pay – there is no community
  • the developers have little passion for the work, they just want to get paid

ocPortal provides the best of all the main competing kinds of system, seamlessly integrated, and centrally designed. Our quality standards are extremely high, and you will find:
  • wizards make performing important tasks very easy
  • interfaces are clean, usable and beautiful
  • there are very few bugs (we fix all bugs as they are reported, there is no database of "known issues" for ocPortal)
  • the documentation is very thorough
  • the terminology is consistent
  • the software is modular, meaning you can uninstall large parts of it if you feel them unnecessary for your website
  • design principles are common throughout the system
  • the source code is easily editable for those with programming experience, with thorough code documentation
  • you do not need to mess around with individual files on your server to configure functionality: everything has a live interface as a part of the system itself
  • interfaces are consistent; for example, the same user data input system is used throughout
  • the system supports your roles in multiple different disciplines, from design, to programming, to marketing, and tries to make them all as accessible as possible
We don't believe any of our low to mid-tier commercial competitors can compete against this.

PHP

PHP is a very widely deployed scripting language to power dynamic websites. Because of its wide deployment, and because web applications for it are relatively easy to install from a remote connection, we chose to write ocPortal in it.

Information for programmers

The PHP language is heavily based on the long-standing C language, but PHP scripts do not require compilation and PHP provides a much richer feature-set (for example, powerful associative arrays, and a very large set of inbuilt functions). There are some aspects of the language we consider negative for large applications such as ocPortal (such as weak-typing, and aspects that encourage bad security practice), but using our in-house developed technology we have been able to mitigate these.

Concepts

website
A collection of web pages that have something in common (such as being on the same domain name, or controlled by the same company)
content management system
Software for managing content; usually a system designed around the collaboration via a work flow on documents that make up a website, rather than truly dynamic content
web-application
An application used via a web browser and running over the world-wide-web
framework
A programming framework is a foundation and guide that speeds the development of tailored software solutions

See also