Skip to content

leemin0830/simp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

simp

"simp" is a simple back-end service framework for PHP. Based on command driven logic, It has a layered-structure and simple AOP concept. You can easily use this framework for your simple ajax & mobile back-end service

Version

0.1.0

How it works

simp architecture

Example

See example files below sequentially,

file description
/html/user.html test view
/manager/UserManager.php for API service exposure
/core/aopconfig.json for aop configuration
/model/UserInfo.php for sample data model

AOP Concept

'simp' supports method-level AOP concept like below:

  • before execute method
  • after execute method
  • before handle exception
  • after handle exception

AOP configuration: You can setup AOP Execution by specifying target class and method. 'all' means default AOP config for the specified class.

{
	"UserManager": 
	{
		"all": 
		{
			"before": 
			[
				{
					"class": "Logger",
					"method": "log"
				}
			],

			"after": 
			[
				{
					"class": "Logger",
					"method": "log"				
				}
			],

			"beforeError": 
			[
				{
					"class": "ErrorHandler",
					"method": "handleError"
										
				}
			],

			"afterError": 
			[
				{
					"class": "ErrorHandler",
					"method": "handleError"					
				}
			]
		}
	}
}

Directories

directory description
aop aop modules
core base classes for framework
manager service managers which is exposed as backend services
model objects combined with data domain objact and data model
log saved logs
html html views

##Todo's

  • Implement ClassLoader & Cache
  • Add Scope Feature (Server Instance, Session, Reqeust)
  • Add 'Scheme(Table) to Model Auto-Generation' Feature
  • Add Front-End Javascript Auto-Generation Feature
  • Handling User Parameters In AOP Module

License

MIT

Free Software, Hell Yeah!

About

Simple Back-end Service Framework For PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages