Pagination is something that has always been somewhat difficult for me. Especially optimizing it for large sites. To make it even harder, the customer wants the first page to show three items, and every subsequent page to show ten. Not hard enough? OK, they want page number links instead of simple left/right arrow links, such as:

1 2 3 [4] Next »

Still Easy?

  • Only show 4 page links at a time
  • When you click ‘next’, show the next block of 4 pages
  • When you click ‘prev’, show the previous block of 4 pages
  • If you are on the first block of links, do not show the ‘prev’ link
  • If you run out of records, only show the correct number of page links in that block
  • If you run out of records, do not show the ‘next’ link

Remember, page 1 has 3 items. Page 2 has 10. So the math gets kinda tricky when you don’t want to do ‘what page are we on’ statements all over the place.

Here is my solution. All you have to do is enter your records per page (”allperpage”), number of page links at a time (”blocksof”), and the number of items on the first page (”firstperpage”).


The SQL query has been optimized to get as close to MySQL’s ‘LIMIT’ function as possible. We’re doing an INNER JOIN here, and sorting on columns from both tables. I haven’t seen any examples of this optimization technique with an inner join, or even sorting on more than one column. We pull back the max rows we’d need, then trim the top with a reverse sort, finally un-reverse the sort for the web page. WHEW.

On to the code: Pagination with ColdFusion and MSSQL (faux MySQL’s LIMIT X,Y)

Web based solutions for business

Saturday, February 17, 2007

From simple brochure sites to Business-to-Business extranets, your company will benefit from my tested and proven solutions.

E-Commerce Systems

My eCommerce solutions for business offer a number of features, including support for online stores selling products in a variety of sizes, styles and colors.

I also include browser-based administration pages as well as a modular approach for customization.

For small and starting businesses I can deploy a transparent PayPal checkout process. The user never leaves your site. Every major payment gateway is supported as well.
    Included features
  • Real-time shipping rates
  • Bulk product uploads/Export
  • Web based order fulfillment engine
  • Real-time shopper tracking
  • Coupons, discounts, user accounts
  • and much more

Content Management System

A custom CMS by WebVeteran.com can manages content (text, graphics, links, etc.) for distribution on your web site. I provide tools where users with little or no knowledge of programming languages and markup languages (such as HTML) can create and manage content with relative ease of use. I use a SQL or MS SQL Server database to hold content, and a presentation layer displays the content to your visitors based on a set of templates. Management of the software is done through a web browser in a secure, password-protected admin area .

A Content Management System (CMS) differs from website builders like Microsoft FrontPage or Macromedia Dreamweaver in that a CMS allows non-technical users to make changes to an existing website with little or no training. Website building tools like FrontPage and Dreamweaver require more technical knowledge and training on average. A CMS is an easy-to-use tool that gives authorized users the ability to manage a website. A CMS is a website maintenance tool rather than a website creation tool.
    Included features
  • Standard visual templates that can be automatically applied to new and existing content, creating one central place to change that look across all content on a site
  • Once your content is separate from the visual presentation of your site, it usually becomes much easier and quicker to edit and manipulate
  • Included WYSIWYG editing tools allowing non-technical individuals to create and edit content
  • Scalable - modules can be installed to extend an existing site's functionality
  • Workflow management: For example, a content creator submits a story but it's not published on the website until the copy editor cleans it up, and the editor-in-chief approves it
  • Document Management: A means of managing the lifecycle of a document from initial creation time , through revisions, publication, archive, and document destruction.

Project Management

Project management is the discipline of organizing and managing resources in such a way that these resources deliver all the work required to complete a project within defined scope, time, and cost constraints . A project is a temporary and one-time endeavor undertaken to create a unique product or service. This property of being a temporary and a one-time undertaking contrasts with processes, or operations, which are permanent or semi-permanent ongoing functional work to create the same product or service over and over again. The management of these two systems is often very different and requires varying technical skills and philosophy, hence requiring the development of project management.

    Features of a custom PM system may include
  • Planning the work
  • Analysis & Design of objectives
  • Estimating resources
  • Organizing the work
  • Assigning tasks
  • Directing activities
  • Controlling project execution
  • Tracking and Reporting progress
  • Analyzing the results
  • Defining the products of the project
  • Project Closure meet
  • ...and any custom needs you may have

Customer Relationship Management

Several commercial CRM software packages are available which vary in their approach to CRM. However, CRM is not just a technology, but rather a holistic approach to an organisation's philosophy in dealing with its customers. This includes policies and processes, front-of-house customer service, employee training, marketing, systems and information management. Hence, it is important that any CRM implementation considers not only technology, but furthermore the broader organisational requirements.

The objectives of CRM strategy must consider a company's specific situation and its customers' needs and expectations.

So how do you fit that level of you-specifics into an off-the-shelf program? You can't. Beware of exaggerated claims by CRM vendors.

It's much smoother to deploy a custom developed CRM system. It will have everything you need, and nothing you don't. It's easier to use and always a custom fit.

Intranets

Commonly understood as "a private version of the Internet". It is a private computer network used to securely share part of an organization's information or operations with its employees. You can use an intranet to interface to legacy corporate data, email, and FTP.
    Advantages
  • Workforce productivity: Via a simple-to-use web browser interface, users can access data held in any database the organization wants to make available, anytime and - subject to security provisions - from anywhere, increasing employees' ability to perform their jobs faster, more accurately, and with confidence that they have the right information.
  • Time: With intranets, organizations can make more information available to employees on a "pull" basis rather than being deluged indiscriminately by emails.
  • Communication: Intranets can serve as powerful tools for communication within an organization.
  • Web publishing allows cumbersome corporate knowledge to be maintained and easily accessed throughout the company using hypermedia and Web technologies. Such as manuals, benefits documents, company policies , business standards, newsfeeds, and even training, can be accessed using common Internet standards (PDF, Flash, etc). Because each business unit can update the online copy of a document, the most recent version is always available to employees using the intranet.

Extranets

Commonly understood as "a private internet over the Internet". A very common use of the term "extranet" is to designate the private part of a website, where registered users can navigate, enabled by authentication mechanisms on a login page. It is a private computer network used to share part of an organization's information or operations with suppliers, vendors, partners, customers or other businesses . You can use an intranet to interface to legacy corporate data, email, and FTP.
    Advantages
  • Extranets can improve organization productivity by automating processes that were previously done manually (eg: reordering of inventory from suppliers), reducing the margin of error of these processes .
  • Extranets allow organizations or project information to be viewed at times convenient for business partners, customers, employees, suppliers and other stake-holders. This cuts down on meeting times and is an advantage when doing business with partners in different time zones.
  • Information on an extranet can be changed instantly. All authorised users have immediate access to the up-to-date information.
  • Extranets can improve relationships with customers, providing accurate and updated information .

Web Portals

A Web portal is a website that provides personalized capabilities to its visitors, providing a pathway to other content. It is designed to provide services from a number of different sources to share collaboration in workplaces. A business-driven requirement of portals is that the content be able to work on multiple platforms such as personal computers, personal digital assistants (PDAs), and cell phones.
    Portal Types
  • Entertainment Portals: Members of an entertainment portal are responsible for its content and direct the type of entertainment that is available to visitors to the site.
  • Environmental Portals: In recent years, many Environmental Portals have been developed in order to raise awareness about Environmental Indicators. Such an Example is the EUSOILS.
  • Investment Portals: These are an excellent resource when researching global and industry specific markets.
  • B2B and B2C Portals: These have become a very important resource for Global business. They provide buyer and seller details for different commodities and products and help in connecting businesses across the globe. A B2B portal that specializes in a single industry is called a Vertical B2B Portal or a Vortal . B2C or Business to Consumer portals are used to directly sell products to consumers.
  • Mini Portals: Some localized portals are based on local interests, and edited and maintained by individuals. While they do not provide the same levels of services as major portals, they are a good place for collaboration of ideas, for commonly interested people.

Forums

Commonly referred to as web forums, message boards, discussion boards, discussion groups, discussion forums, and bulletin boards. An internet forum is a facility on the Web for holding discussions and posting user generated content, or the web application software used to provide the facility. A sense of virtual community often develops around forums that have regular users. Technology, computer games , and politics are popular areas for forum themes, but there are forums for a huge number of different topics.

Blogs

A blog is a user-generated website where entries are made in journal style and displayed in a reverse chronological order.

Blogs often provide commentary or news on a particular subject, such as food, politics, or local news ; some function as more personal online diaries. A typical blog combines text, images, and links to other blogs, web pages, and other media related to its topic. The ability for readers to leave comments in an interactive format is an important part of many blogs. Most blogs are primarily textual although some focus on photographs (photoblog), sketchblog, videos (vlog), or audio (podcasting), and are part of a wider network of social media.

For more information, please see: http://www.webveteran.com/services/Solutions.cfm

I'm Jules Gravinese - a seasoned, professional, cross platform, freelance web developer of over ten years.

Being a Web developer, I offer HTML and programming services and create interactive or database driven e-commerce web sites. I have a lot of back-end programming skills for building shopping carts and member databases while I can also be focused on the look and feel of a site. I will help you organize the information for your web site and develop navigation and layout. I also offer design services. I work with web based code like ColdFusion, DHTML, Javascript, PHP, SQL and more. If you are looking for database work for e-commerce or membership sites, you should contact me.

Less experienced programmers may save you money but I will always deliver a higher quality product with less problems and maintenance issues, in less time. Before you choose me for your developer you should review other web projects I have worked on in my portfolio.

Web Design and Development Custom Programming Development ColdFusion Programming

I've been programming ColdFusion websites since 1998, well before it was bought from Allaire by Macromedia.
ColdFusion is a server scripting language used to create rich dynamic web pages. It has connectivity to enterprise level data and powerful built-in search and charting capabilities. ColdFusion enables web developers such as myself to build and deploy dynamic web sites, content publishing systems, self-service applications, e-commerce sites and more.
ColdFusion is server side technology meaning it's processed by the web server. ColdFusion allows me to build and deploy powerful web services in less time and fewer lines of code than ASP, PHP or JSP.


PHP Programming

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
PHP is mainly focused on server-side scripting, so you can do anything any other CGI program can do, such as collect form data, generate dynamic page content, or send and receive cookies. But PHP can do much more.
Since php is a free product, there are thousands of programmers for it. What sets me apart is leveraging intelligent programming methods acquired from over ten years experience in 6 other programming languages.


Credit Card Processing

Accept credit card payments from your customers. It is the most popular and convenient payment method over the Internet and ignoring it means losing many potential customers. Most payment gateways have a sophisticated fraud protection mechanism. The process is fully automated so you can save vast amount of time over using a virtual terminal. I can get your site accepting credit card payments in many currencies and in real-time.


Real Time Shipping Calculation

It is convenient for consumers of the ecommerce store to be aware of shipping fees on the stage of adding products to shopping cart. Generally, shipping cost depends on customer's location, distance and characteristics of the package. I can combine real time shipping calculations with your manually defined shipping rules, markups, etc.


Javascript Programming & DHTML

JavaScript is a script language - a system of programming codes, created by Netscape, that can be embedded into the HTML of a web page to add functionality. In general, script languages such as JavaScript are faster to code than more structured languages such as Java and C++.
There are many javascript websites with seemingly 'drag-n-drop' scripts. Seldom do they work without modification. And they're usually very bloated, causing them to load and behave slowly.
With me you'll get a custom client-side program that is lean and efficient, something that's very important since you'll never know the power of you viewer's machine.


XML

The Extensible Markup Language ("XML") allows us to create special-purpose markup languages, capable of describing many different kinds of data. Its primary purpose is to facilitate the sharing of data across different systems, particularly systems connected via the Internet.
Using XML I can create for you pages that display real time data from various other sources, i.e. broadcast messages (RSS/news feeds) and generic shipping rates.


SOAP

SOAP is a protocol for exchanging XML-based messages over a computer network, normally using HTTP. One network node (the client) sends a request message to another node (the server), and the server immediately sends a response message to the client.
With SOAP, I can build pages that display pages based on user input, including specific weather for a region or shipping rates based on to/from addresses. SOAP commonly uses XML, but in an interactive or user specific way.


AJAX

Asynchronous JavaScript and XML ("AJAX"), is a web development technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user makes a change. This is meant to increase the web page's interactivity, speed, and usability.
Ajax allows me to perform the same operation as SOAP, above, except without having to reload the web page. Two widely known examples are Google Maps and gMail. When done very well, an Ajax application will seem to work more like Flash or a desktop application.


For more information please visit: http://www.webveteran.com/services/programming.cfm