Book Image

MODx Web Development - Second Edition

Book Image

MODx Web Development - Second Edition

Overview of this book

MODx is a content management system and PHP web application framework rolled into one. With the ease of a CMS and the extendibility of a framework, MODx allows you to develop professional-looking, intricate websites with its easy-to-use interface and flexible architecture. MODx provides reusable code fragments called snippets, most of which are so generic that, without any modification, they can serve multiple functionalities. The generic nature of the snippets makes it possible to get the perfect customization that is so hard in other CMS. This book will get web developers up-and-running with MODx. With step-by-step examples and illustrative screenshots, you will be guided through installation, configuration, and customization. By the end of the book, you will have created a powerful, dynamic website by using the individual elements of MODx, without the need for programming know-how. Starting with a walk-through of how to install MODx, you will quickly learn how to develop your site without having to use any programming language. Logical, step-by-step instructions will show you how to create your own unique site by adding and editing documents using the inbuilt TinyMCE editor. You will change the look and feel of your site by creating your own templates using HTML, CSS, and widgets. By following the example of a blog site, you will learn how to extend your templates to allow rich user interactions through comments, posts, and forms. The book teaches a few code snippets such as Ditto and Wayfinder in detail. These powerful and flexible snippets will enable you to add multiple functionalities to your site. The book will also introduce you to many more snippets that will help you build some of the commonly required web functionalities such as forums and image galleries. You will manage your users with authentication and authorization and make your site user-friendly with user groups, forums, and the use of PHx notations to embed logic in templates. Through following this easy-to-use, step-by-step guide you will, by the end of the book, have a fully functional, feature-rich MODx site with professional-looking, dynamic web pages that are totally customizable.
Table of Contents (19 chapters)
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
12
SEO, Deployment, and Security

An application framework


An application framework is an integrated platform that makes the process of developing and maintaining applications a lot simpler. Often they support a certain development methodology and provide interfaces and tools to make the development rapid and agile.

An application framework serves the following two primary purposes:

  • Reusable program components: Any code that has been written once should be available for use within the same application, and in other applications too. This is called reusability. Generally, high reusability is achieved by careful planning and adherence to an objected-oriented paradigm. An application framework reduces the overheads in developing such reusable program components, and handles many of the coding overheads internally.

  • Abstracting logic from presentation: In a simpler sense, separating logic from presentation means separating any programming code from the formatting of whatever is finally rendered to the end user (presentation). Ultimately, what a browser can render is generated by the presentation layer and is known as the Document Object Model (DOM). The DOM has a structure, presentation, and behavior. Structure is generally defined by HTML, the presentation by CSS, and behavior by using JavaScript. Separation of logic from presentation means keeping everything that belongs to the DOM away from actual code. Application frameworks help in achieving such a separation by providing what is generally known as templating languages. MODx also allows the separation of logic from presentation, but how it helps you to do this is quite different from what is commonly known among developers as templating.