Giter Club home page Giter Club logo

jofe's Introduction

Jofe - Joomla 1.5 extension

Some common features I abstracted out when work with Joomla 1.5.

I wasn't aiming for a full, big library. Just something that helps rapid development.

Simplicity is the key.

For example. It does include an inflector library. So instead of what you see in Rails:

	post.comments
	post.comments.size

In Jofe it is like

	post._obj_comment
	post._count_comment

Note that although it is a one-to-many relationship, comment is still referred in singular form by post.

It is not very cool by looking at it, but simply works for developers.

Location: /libraries/jofe/

Extensions:

Major extensions:

  • JofeComponent - Simplify the component creation.
	jimport('jofe.application.component');
	
	class BlogComponent extends JofeComponent{
		protected $_default_controller = 'post';
		
		public function  prepare() {
			parent::prepare();
			$this->addStyleSheet('blog.css');
			$this->addScript('jquery-1.4.4.min.js');
			$this->addScript('blog.js');
		}
	}
	
	$com = new BlogComponent();
	$com->run();
  • JofeController - Extends JController. Wraps RESTful actions.
  • JofeView - Extends JView. Very small extention just created some default RESTful responses.
  • JofeTable - Extends JTable.
    • Simple ORM features
      • find function
      • object relationship specified in relates_to_one, and relates_to_many.
      • A couple of helper functions
    • Triggers
  • JofeModel - Extends JModel. Handles pagination/sorting/filtering

Side extensions:

Have dependency on jQuery and need some CSS

  • JofeForm - Helps create form.
  • JofeGrid - Takes data returned by JofeModel and renders grid.
	$grid = new JofeGrid(array(
				array(
					'header' => 'Title',
					'width' => '50%',
					'field' => 'title',
					'callback' => 'post_grid_col_title',
					'sortable' => true
				),
				array(
					'header' => 'Created',
					'width' => '20%',
					'field' => 'created_on',
					'sortable' => true
				)
			),
			$this->griddata
		);
	$grid->render();

Sample component:

/components/com_blog

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.