Skip to content

aravindmi/NodeIgniter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeIgniter

Introduction

The NodeIgniter is a framework ported from CodeIgniter PHP framework in Javascript for Node.js.

Inspiration

The NodeIgniter framework is inspired by the idea of Ni framework (https://github.com/chetan51/ni) and it is based on the concept of the Codeigniter PHP framework (http://www.codeigniter.com).

Included sources

In order to do the minimum changes through the CodeIgniter's original PHP sources I used some of the phpJS functions (http://www.phpjs.org) but others are just made up in situ because the phpJS coding philosophy is not quite suitable for this type of project.

I tried to keep the minimal third-party modules so ejs (https://github.com/visionmedia/ejs) is the only module I used, as a template engine. It's too bad it still has no standalone support for partial views.

Coding Philosophy

Basically I simply converted the CodeIgniter's base and core libraries from PHP to Javascript, adjusting the prototyping where it needed to and keeping the CodeIgniter's folder structure so anyone who knows how to work with CodeIgniter surely will do just fine with NodeIgniter. The use of PHP-like functions was a good idea for me at that time because I only wanted to see if the pure Javascript conversion is working as expected. Now it seems that it does, still I know that it can be done better.

What you can do with it

You would simply run the command "node index.js" and go to http://localhost:3000. It will automatically load the default controller which is located in application/controllers/index.js. I made three methods available for navigation, one is the default index method, the second is a custom route and the third is a method that accepts parameters.

I haven't got the time to test the helpers and the models, but I expect they will work with minimal adjustments to the code. Anyone interested in developing this further is welcome to do whatever changes are necessary.

Enjoy!

Contact

If you would like to contact me you can email me at leonardo.radoiu [ at ] gmail.com

Thanks

I want to thank to my colleague Dan Harabor for the nodejs insights and tricks that he had kindfully given to me. He is one of the contributors on this framework.

Contributors

Leonardo Radoiu

Dan Harabor

About

CodeIgniter Framework ported on Javascript for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.6%
  • HTML 0.4%