Coder Social home page Coder Social logo

cjax's Introduction

Cjax Web Development Ajax Framework

Requirements

  • PHP 5.2+
  • Strict Standards turned off

Links

Official Site: http://cjax.sourceforge.net/

Official Repo: https://github.com/ajaxboy/cjax

Official Download Location: https://sourceforge.net/projects/cjax/files/

Instructions

This reposition is for Folk only and contributions only, for downloads go to: http://cjax.sourceforge.net/. We build the releases internally because there are different packages that derive from this project (examples, plugins, docs, and 2 versions of Cjax).

Introduction

Cjax is a small lightweight but very powerful Ajax Framework that translate PHP Code into User Interface Actions. It can help to develop Ajax applications in record time, saving you up to 60% of development time once you are familiar with the simple to use Cjax API.

Cjax is simplistic and uses Convention Over Configuration model approach. With its MVC design makes it quite easy to integrate into existing PHP-Frameworks (such as Zend, CodeIgnater, cakePHP, Yii, etc).

In most cases all you need is one line of code. Cjax carries a plugin system (as well as the core) that makes PHP and JavaScript look like lovers, meaning that it is the most seemless integration of PHP and JavaScript that you can find.

Unlike others libraries that try to mimic Cjax, for cjax there is no 'client' side involved, there is no inlines codes, there is no process request, all you need is your php code and that's it.

Cjax is so easy to use that even a 12 year old could figure it out, go ahead, give it a try.

Example code

Check the a lot of examples and code at http://cjax.sourceforge.net/examples/

Full API Documentation

http://cjax.sourceforge.net/docs/ (Also anyone can contribute/folk to the docs on this repo).

Documentation

It's really simple as

The CJax's way, one line of php code does it all

Example #1 - Ajax Call

<?php
$ajax->click('#element_id' , $ajax->call('controller/the_function/'));
?>
<!doctype html>
<html>
	<head>
		<?php echo $ajax->init();?>
	</head>
	<body>
		<a id='element_id' href='#'>Click me</a>
	</body>
</html>

Example #2 - Ajax Form

<?php
$ajax->click('#element_id' , $ajax->form('controller/the_function/'));
?>
<!doctype html>
<html>
	<head>
		<?php echo $ajax->init();?>
	</head>
	<body>
	<form>
		Field #1 <input type='text' id='field1' name='field1' />
		<br />
		Field #2 <input type='text' id='field1' name='field2' />
		<br />
		<a id='element_id' href='#'>Click me To Submit Form</a>
	</form>
	</body>
</html>

Example #3 - Ajax Overlay, Lightbox

<?php
$ajax->click('#element_id' , $ajax->overlay('some/splash/html'));
?>
<!doctype html>
<html>
	<head>
		<?php echo $ajax->init();?>
	</head>
	<body>
		<a id='element_id' href='#'>Click Show Overlay</a>
	</body>
</html>

cjax's People

Contributors

ajaxboy avatar xobxxi avatar

Watchers

James Cloos avatar Kabir Hossain avatar

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.