Building a Content Management System with Prototype
The Prototype library has grown in popularity among JavaScript programmers because of the powerful features that come bundled with it. In this set of three articles, you'll learn how to use this versatile framework for building a content management system. This first part will deal with the creation of the front end of the CMS.
Building a Content Management System with Prototype - The full client-side code (Page 4 of 4 )
As I stated previously, I'd like you to have a more accurate idea of how the CSS styles and the corresponding structural markup that compose this Prototype-based CMS are linked to each other.
Here is the complete client-side code of this application, which I said previously, integrates the respective visual styles and (X)HTML in the same file:
Since the signature of the above ()HTML file is actually very simple to grasp, I suppose you shouldn't have major problems understanding how this file works. Also, it's worth noting that since the file in question is only responsible for creating a basic user interface for the content management system, there's plenty of room here to experiment and provide the application with the look and feel that best suits your personal needs.
A final note before you finish reading: if you wish to test this application, you may want to download its source files. However, bear in mind that you'll have to get the Prototype library from its official web site.
Final thoughts
Unfortunately, we've come to the end of this article. In this first part of the series, I went through the creation of a basic front-end for implementing an expandable content management system that uses the Prototype JavaScript framework as the workhorse to insert, edit and delete articles from a simple MySQL database.
In the next part of the series, things will be a little more complex. I'm going to develop the JavaScript functions that interact with the mentioned MySQL database, turning the CMS application into a fully-functional piece of software.
Now that you've been warned, you won't want to miss it!
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.