Joomla! 1.5 Framework Structure

Source: Internet
Author: User
Tags xml parser

The Framework Structure of a software is designed for the reusability of the software system. This is a representation of the abstract class in a specific type of software and the cooperative set between instances. The software framework can be an object-oriented design. Although the design is not necessarily implemented by object-oriented design, it is usually object-oriented. A software framework may help development by supporting programs, code libraries, scripting languages, and some other software, or integrating different software project components. Various framework structures may be exported through APIS for use. (From Wikipedia)

Joomla! 1.5 is a three-tier system:

  • Top-layer: extended layer, includingFrameworkAnd Application Extensions

    • Modules (module) is a lightweight and flexible extension for page display. Sometimes it may be connected to components, such as the "lastest news" module. This module is connected to the content component "com_content" to display the list of the latest connected content. Most of the time a module is "box" visible to users, it is organized on a certain component (packaging component), for example, login module. A module can be assigned to a menu item. For example, you can decide whether to display or hide a module when a component (menu item) is used. In any case, a module can be not associated with any component, but as a static HTML or text. The module can be placed in the module position, and positions are defined in the joomla template. In addition, you can add at the end of the front-end URL? TP = 1 or & TP = 1 to view the available positions of the template you are using.
    • Components)
    • Templates has two types of templates: front-end templates and backend templates. Download template from template contest
  • Middle Layer-application layer, including extended joomlaFrameworkJapplicationclass applications. Currently, four applications exist in the joomla release.
    • Jinstallation is responsible for joomla installation on the Web server. After the installation is complete, it is deleted to complete the installation process.
    • Jadministrator is responsible for the back-end management of joomla.
    • Jsite is responsible for the front-end of the web site
    • XML-RPC supports remote management of joomla sites
  • Underlying-framework layer, including
    • JoomlaFrameworkItself, whose classes are listed below.
    • Libraries, yesFrameworkRequired or installed for third-party developers
    • Plugins for extension inFramework. Joomla! Plugin serves a variety of purposes and serves as a module to enhance the effect of the final Web output page, while joomla! Plugin can enhance the data and the installation function. Although some possible types of plug-ins are almost infinite, some are joomla! Types of core plug-ins used. These types of core plug-ins are organized under the/plugins/directory. They are:
      • Authentication -- allow you to authenticate (to allow you to login) against different sources. By default you will authenticate against the joomla! User Database when you try to login. however, there are other methods available such as by openid, by a Google account, LDAP, and other others. wherever a source has a public API, you can write an authentication plugin to verify the login credentials against this source. for example, you can write a plugin to authenticate against Twitter accounts because they have a public API.
      • Content -- modify and add features to displayed content. for example, content plugins can cloak email address or can convert URL's into SEF format. content plugins can also look for markers in content and replace them with other text or HTML. for example, the load module plugin will take {* loadmodule banner1 *} (you wocould remove the *'s in practice. they are pinned ded to actually prevent the plugin from working in this article), load all the modules in the banner1 position and replace the marker with that output.
      • Editors -- allow you to add new content editors (usually wysiywg ).
      • Editors-xtd -- allow you to add additional buttons to the editors. For example,Image,PagebreakAndRead moreButtons below the default editor are actually plugins.
      • Search -- allow you to search different content from different components. For example, search plugins for articles, contacts and weblinks are already provided in joomla !.
      • System -- allow you to perform actions at various points in the execution of the PHP code that runs a joomla! Web site.
      • User -- allow you to perform actions at different times with respect to users. such times include logging in and out and also saving a user. user plugins are typically user to "bridge" between Web applications (such as creating a joomla! To phpBB Bridge ).
      • XMLRPC -- allow you to provide additional XML-RPC Web Services for your site. when your web site exposes Web Services, it gives you the ability to interact remotely, possibly from a desktop application. web services are a fairly advanced topic and will not be covered in much detail here.

Packages and Classes

In joomla!FrameworkClasses in is loosely coupled in several different packages.
See onlineJoomla! 1.5 api reference

    1. Jfactory -- defined in/libraries/joomla/factory. php
      Provides a simple method to organize and manage joomlaFrameworkThe singleton object to be accessed. It should be noted that this class is globally available, that is, it does not need to be explicitly imported into your code.
      Method Name Description
      Getacl Returns a global jauthorisation object reference, which is created only when it does not exist.
      Getapplication Returns a global japplication object reference, which is created only when it does not exist.
      Getcache Returns a global jcache object reference, which is created only when it does not exist.
      Getconfig Returns a global jregistry object reference, which is created only when it does not exist. Data in jregistry contains some configuration information, which is implemented through stdclass.
      Getdate Returns a global JDate object reference, which is created only when it does not exist.
      Getdbo Returns a global jdatebase object reference, which is created only when it does not exist.
      Getdocument Returns a global jdocument object reference, which is created only when it does not exist.
      Geteditor A global jeditor object reference is returned, which is created only when the global jeditor object does not exist.
      Getlanguage Returns a global jlanguage object reference, which is created only when it does not exist.
      Getmailer Returns a global jmailer object reference, which is created only when it does not exist.
      Getsession Returns a global jsession object reference, which is created only when it does not exist.
      Gettemplate

      Discard in joomla 1.5.x; remove from joomla 1.6 and later.

      Returns a global jtemplate object reference, which is created only when it does not exist. The pattemplate template system is no longer in use.

      Geturi Returns a global Juri object reference, which is created only when it does not exist.
      Getuser Returns a global juser object reference, which is created only when it does not exist.
      Getxmlparser Returns a reference to a global XML Parser object, which is created only when it does not exist. Different Resolvers are available.
    2. Jtext -- defined in/libraries/joomla/methods. php
      Jtext is a text processing class that allows developers to specify text fragments in the source code and translate them into the language used by the current website at runtime.
      Method Name Description
      _ Translate characters to the current language
      Printf Translate characters to the current language and pass them to the printf function.
      Sprintf Translate characters to the current language and pass them to the sprintf function.
    3. Japplication -- defined in/joomla/application. php
      Japplication is the base class of a joomla application. It acts as a factory class for a specific application and provides many API methods. All child classes inherited from it should implement three methods: Route (), dispatch (), and render.
      Method Name Description
      _ Construct Constructor
      Addcustomheadtag Discard method. Use jdocument-> addcustomtag instead (only when the document type is html ).
      Addw.ag Discard method. Use jdocument-> setmetadata instead.
      Append1_ag Discard method. Use jdocument-> setmetadata instead.
      Appendpathway Discard method, use jpathway-> additem () instead.
      Close Exit the application.
      Dispatch Allocate application requests to corresponding components.
      Enqueuemessage Queue.
      Getbasepath Discard method. Use Juri: Base () instead.
      Getblogcategorycount Disposal method.
      Getblogsectioncount Disposal method.
      Getcfg Obtain the configuration value in configuration. php.
      Getclientid Obtain the Client ID of the currently running application.
      Getcontentitemlinkcount Disposal method.
      Getcustompathway Discard method. Use jpathway-> getpathwaynames () instead.
      Getglobalblogsectioncount Disposal method.
      Gethead Discard method. Use jdocument-> get ('head') instead.
      Getinstance Returns a global japplication object reference, which is created only when it does not exist.
      Getitemid The deprecated method is replaced by contenthelper: getitemid.
      Getmenu Return the reference of the jmenu object of the application.
      Getmessagequeue Obtain the system message queue.
      Getname Get Application name
      Getpagetitle Discard method. Use jdocument: gettitle instead.
      Getpath Discard method. Use japplicationhelper: getpath instead.
      Getpathway Return the jpathway object reference of the application.
      Getrouter Return the jrouter object reference of the application.
      Getstaticcontentcount Disposal method.
      Gettemplate Obtain the name of the current template.
      Getuser Discard method. Use jfactory: getuser instead.
      Getuserstate Obtain the user status.
      Getuserstatefromrequest Gets the value of a user state variable.
      Initialise Initialize application.
      Isadmin Is admin interface?
      Issite Is site interface?
      Login Login authentication function.
      Logout Logout authentication function.
      Prependsponag Discard method, use jdocument-> setmetadata to replace
      Redirect Redirect to another URL.
      Registerevent Register a handler to a specific event group.
      Render Rendering the application. In this process, the document cache is first passed to the template replacement processor (placeholders), then the data is obtained from the document cache, and then the data is stored in the jresponse cache (buffer ).
      Route Determine the application line. This process is to first check the request environment to determine which component should receive the current request. Then, when the application is about to be assigned, the optional parameters of the component will be set in the current request object.
      Setpagetitle Discard method. Use jdocument: settitle instead.
      Setuserstate Sets the value of a user state variable.
      Triggerevent Call all handlers associated with a specific event group.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.