Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Elgg 1.8 Social Networking

You're reading from   Elgg 1.8 Social Networking Create, customize, and deploy your very own social networking site with Elgg with this book and ebook

Arrow left icon
Product type Paperback
Published in Feb 2012
Publisher Packt
ISBN-13 9781849511308
Length 384 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Cash Costello Cash Costello
Author Profile Icon Cash Costello
Cash Costello
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Elgg 1.8 Social Networking
Credits
Foreword
About the Author
About the Author of 1st edition
About the Reviewers
www.PacktPub.com
Preface
1. Social Networking and Elgg FREE CHAPTER 2. Installing Elgg 3. A Tour of Your First Elgg Site 4. Sharing Content 5. Communities, Collaboration, and Conversation 6. Finding and Using Plugins 7. Creating Your First Plugin 8. Customization through Plugins 9. Theming Elgg 10. Moving to Production Developer's Quick Start Guide Views Catalog Index

Overview of Elgg as a framework


This overview covers basic questions about Elgg such as whether it is object-oriented and what kind of template language is used. These are the sorts of questions that are valuable to have answers to before looking at the design and structure of a framework.

What is Elgg?

Elgg is an open source framework for developing social networking and social media websites. It is written in PHP, uses MySQL for data persistence, and includes jQuery for client-side scripting.

Object-oriented or procedural?

The answer is both. The data model of Elgg is primarily object-oriented, while the rest of the framework is mostly procedural. This provides flexibility to plugin developers. For example, a page controller in Elgg can be a script, a function, or a class method. The choice is left up to the developer.

Does it use the Model-View-Controller pattern?

Elgg is not a textbook implementation of the Model-View-Controller (MVC) pattern. Elgg does not use the terminology of MVC, which can make it difficult at first to see the pattern. Viewing it from an MVC perspective, though, does make it easier to grasp Elgg's design.

Convention or configuration?

The answer to this question is also both. The model and controller use configuration exclusively and the view system is primarily convention-based with some configuration.

Is it extensible?

Elgg has a modular architecture that uses plugins to extend or modify the core engine. Without any plugins enabled, an Elgg site supports account creation, user settings, administration and not much else. This plugin-based approach gives developers flexibility and control when building web applications with Elgg.

Extensibility is also provided through an event-based hook system. Rather than editing core code, developers can modify the behavior of the framework by registering callbacks for an event. The callbacks perform their own processing of the data, prevent the core from taking an action, or change the output of a function. For example, every time a blog post is saved, an event is fired. A callback function registered for that event could check for spam and reject the post.

What template engine is used?

Elgg uses PHP as its template engine. This results in a flexible view system since the full power of PHP is available. Developers also do not have to learn a new template language to use Elgg as they would with an engine like Smarty. On the downside, an expressive template language such as PHP is a temptation to mix controller code into the views.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image